13#error "AltiVec support not enabled"
28#define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0)
29#define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1)
30#define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
31 __VEC_CLASS_FP_SUBNORMAL_N)
32#define __VEC_CLASS_FP_ZERO_N (1<<2)
33#define __VEC_CLASS_FP_ZERO_P (1<<3)
34#define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \
35 __VEC_CLASS_FP_ZERO_N)
36#define __VEC_CLASS_FP_INFINITY_N (1<<4)
37#define __VEC_CLASS_FP_INFINITY_P (1<<5)
38#define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
39 __VEC_CLASS_FP_INFINITY_N)
40#define __VEC_CLASS_FP_NAN (1<<6)
41#define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
42 __VEC_CLASS_FP_SUBNORMAL | \
43 __VEC_CLASS_FP_ZERO | \
44 __VEC_CLASS_FP_INFINITY)
46#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
51 vector
signed char __a, vector
signed char __b, vector
unsigned char __c);
55 vector
unsigned char __c);
61 vector
signed short __b,
62 vector
unsigned char __c);
66 vector
unsigned char __c);
69 vector
bool short __a, vector
bool short __b, vector
unsigned char __c);
73 vector
unsigned char __c);
76 vector
signed int __b,
77 vector
unsigned char __c);
80 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned char __c);
87 vector
unsigned char __c);
92 vector
unsigned char __c);
95vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
96 vector
unsigned char __c);
100 vector
unsigned char __c);
104 vector
unsigned char __c);
112#define __builtin_altivec_abs_v16qi vec_abs
113#define __builtin_altivec_abs_v8hi vec_abs
114#define __builtin_altivec_abs_v4si vec_abs
118 return __builtin_altivec_vmaxsb(
__a, -
__a);
123 return __builtin_altivec_vmaxsh(
__a, -
__a);
128 return __builtin_altivec_vmaxsw(
__a, -
__a);
131#ifdef __POWER8_VECTOR__
134 return __builtin_altivec_vmaxsd(
__a, -
__a);
140 return __builtin_vsx_xvabssp(
__a);
142 vector
unsigned int __res =
143 (vector
unsigned int)
__a & (vector
unsigned int)(0x7FFFFFFF);
144 return (vector
float)__res;
150 return __builtin_vsx_xvabsdp(
__a);
155#define __builtin_altivec_abss_v16qi vec_abss
156#define __builtin_altivec_abss_v8hi vec_abss
157#define __builtin_altivec_abss_v4si vec_abss
161 return __builtin_altivec_vmaxsb(
162 __a, __builtin_altivec_vsubsbs((vector
signed char)(0),
__a));
167 return __builtin_altivec_vmaxsh(
168 __a, __builtin_altivec_vsubshs((vector
signed short)(0),
__a));
173 return __builtin_altivec_vmaxsw(
174 __a, __builtin_altivec_vsubsws((vector
signed int)(0),
__a));
178#if defined(__POWER9_VECTOR__)
181vec_absd(vector
unsigned char __a, vector
unsigned char __b) {
182 return __builtin_altivec_vabsdub(
__a,
__b);
186vec_absd(vector
unsigned short __a, vector
unsigned short __b) {
187 return __builtin_altivec_vabsduh(
__a,
__b);
191vec_absd(vector
unsigned int __a, vector
unsigned int __b) {
192 return __builtin_altivec_vabsduw(
__a,
__b);
206 return (vector
signed char)
__a +
__b;
211 return __a + (vector
signed char)
__b;
221 return (vector
unsigned char)
__a +
__b;
226 return __a + (vector
unsigned char)
__b;
236 return (vector
short)
__a +
__b;
240 vector
bool short __b) {
241 return __a + (vector short)
__b;
251 return (vector
unsigned short)
__a +
__b;
256 return __a + (vector
unsigned short)
__b;
266 return (vector
int)
__a +
__b;
270 vector
bool int __b) {
281 return (vector
unsigned int)
__a +
__b;
289#ifdef __POWER8_VECTOR__
291vec_add(vector
signed long long __a, vector
signed long long __b) {
296vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
300#ifdef __SIZEOF_INT128__
302vec_add(vector
signed __int128
__a, vector
signed __int128
__b) {
307vec_add(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
312static __inline__ vector
unsigned char __attribute__((__always_inline__))
313vec_add_u128(vector
unsigned char __a, vector
unsigned char __b) {
314 return (vector
unsigned char)__builtin_altivec_vadduqm(
__a,
__b);
316#elif defined(__VSX__)
318vec_add(vector
signed long long __a, vector
signed long long __b) {
319#ifdef __LITTLE_ENDIAN__
324 vector
unsigned int __res =
325 (vector
unsigned int)
__a + (vector
unsigned int)
__b;
326 vector
unsigned int __carry = __builtin_altivec_vaddcuw(
327 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
328 __carry = (vector
unsigned int)__builtin_shufflevector(
329 (vector
unsigned char)__carry, (vector
unsigned char)__carry, 0, 0, 0, 7,
330 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0);
331 return (vector
signed long long)(__res + __carry);
336vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
337 return (vector
unsigned long long)
vec_add((vector
signed long long)
__a,
338 (vector
signed long long)
__b);
356#ifdef __POWER8_VECTOR__
357#ifdef __SIZEOF_INT128__
360 vector
signed __int128
__c) {
361 return (vector
signed __int128)__builtin_altivec_vaddeuqm(
362 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
363 (vector
unsigned __int128)
__c);
367vec_adde(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
368 vector
unsigned __int128
__c) {
369 return __builtin_altivec_vaddeuqm(
__a,
__b,
__c);
373static __inline__ vector
unsigned char __attribute__((__always_inline__))
374vec_adde_u128(vector
unsigned char __a, vector
unsigned char __b,
375 vector
unsigned char __c) {
376 return (vector
unsigned char)__builtin_altivec_vaddeuqm_c(
377 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
378 (vector
unsigned char)
__c);
384 vector
signed int __c) {
385 vector
signed int __mask = {1, 1, 1, 1};
386 vector
signed int __carry =
__c & __mask;
392 vector
unsigned int __c) {
393 vector
unsigned int __mask = {1, 1, 1, 1};
394 vector
unsigned int __carry =
__c & __mask;
400#ifdef __POWER8_VECTOR__
401#ifdef __SIZEOF_INT128__
403vec_addec(vector
signed __int128
__a, vector
signed __int128
__b,
404 vector
signed __int128
__c) {
405 return (vector
signed __int128)__builtin_altivec_vaddecuq(
406 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
407 (vector
unsigned __int128)
__c);
411vec_addec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
412 vector
unsigned __int128
__c) {
413 return __builtin_altivec_vaddecuq(
__a,
__b,
__c);
417static __inline__ vector
unsigned char __attribute__((__always_inline__))
418vec_addec_u128(vector
unsigned char __a, vector
unsigned char __b,
419 vector
unsigned char __c) {
420 return (vector
unsigned char)__builtin_altivec_vaddecuq_c(
421 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
422 (vector
unsigned char)
__c);
427vec_addec(vector
signed int __a, vector
signed int __b,
428 vector
signed int __c) {
430 signed int __result[4];
431 for (
int i = 0; i < 4; i++) {
432 unsigned int __tempa = (
unsigned int)
__a[i];
433 unsigned int __tempb = (
unsigned int)
__b[i];
434 unsigned int __tempc = (
unsigned int)
__c[i];
435 __tempc = __tempc & 0x00000001;
436 unsigned long long __longa = (
unsigned long long) __tempa;
437 unsigned long long __longb = (
unsigned long long) __tempb;
438 unsigned long long __longc = (
unsigned long long) __tempc;
439 unsigned long long __sum = __longa + __longb + __longc;
440 unsigned long long __res = (__sum >> 32) & 0x01;
441 unsigned long long __tempres = (
unsigned int) __res;
442 __result[i] = (
signed int) __tempres;
445 vector
signed int ret = { __result[0], __result[1], __result[2], __result[3] };
450vec_addec(vector
unsigned int __a, vector
unsigned int __b,
451 vector
unsigned int __c) {
453 unsigned int __result[4];
454 for (
int i = 0; i < 4; i++) {
455 unsigned int __tempc =
__c[i] & 1;
456 unsigned long long __longa = (
unsigned long long)
__a[i];
457 unsigned long long __longb = (
unsigned long long)
__b[i];
458 unsigned long long __longc = (
unsigned long long) __tempc;
459 unsigned long long __sum = __longa + __longb + __longc;
460 unsigned long long __res = (__sum >> 32) & 0x01;
461 unsigned long long __tempres = (
unsigned int) __res;
462 __result[i] = (
signed int) __tempres;
465 vector
unsigned int ret = { __result[0], __result[1], __result[2], __result[3] };
473#define __builtin_altivec_vaddubm vec_vaddubm
482 return (vector
signed char)
__a +
__b;
487 return __a + (vector
signed char)
__b;
497 return (vector
unsigned char)
__a +
__b;
502 return __a + (vector
unsigned char)
__b;
507#define __builtin_altivec_vadduhm vec_vadduhm
516 return (vector
short)
__a +
__b;
520 vector
bool short __b) {
521 return __a + (vector short)
__b;
531 return (vector
unsigned short)
__a +
__b;
536 return __a + (vector
unsigned short)
__b;
541#define __builtin_altivec_vadduwm vec_vadduwm
550 return (vector
int)
__a +
__b;
554 vector
bool int __b) {
565 return (vector
unsigned int)
__a +
__b;
575#define __builtin_altivec_vaddfp vec_vaddfp
577static __inline__ vector
float __attribute__((__always_inline__))
578vec_vaddfp(vector
float __a, vector
float __b) {
586 return (vector
signed int)__builtin_altivec_vaddcuw((vector
unsigned int)
__a,
587 (vector
unsigned int)
__b);
592 return __builtin_altivec_vaddcuw(
__a,
__b);
595#ifdef __POWER8_VECTOR__
596#ifdef __SIZEOF_INT128__
599 return (vector
signed __int128)__builtin_altivec_vaddcuq(
600 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
604vec_addc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
605 return __builtin_altivec_vaddcuq(
__a,
__b);
609static __inline__ vector
unsigned char __attribute__((__always_inline__))
610vec_addc_u128(vector
unsigned char __a, vector
unsigned char __b) {
611 return (vector
unsigned char)__builtin_altivec_vaddcuq_c(
612 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
618static __inline__ vector
unsigned int __attribute__((__always_inline__))
619vec_vaddcuw(vector
unsigned int __a, vector
unsigned int __b) {
620 return __builtin_altivec_vaddcuw(
__a,
__b);
627 return __builtin_altivec_vaddsbs(
__a,
__b);
632 return __builtin_altivec_vaddsbs((vector
signed char)
__a,
__b);
637 return __builtin_altivec_vaddsbs(
__a, (vector
signed char)
__b);
642 return __builtin_altivec_vaddubs(
__a,
__b);
647 return __builtin_altivec_vaddubs((vector
unsigned char)
__a,
__b);
652 return __builtin_altivec_vaddubs(
__a, (vector
unsigned char)
__b);
657 return __builtin_altivec_vaddshs(
__a,
__b);
662 return __builtin_altivec_vaddshs((vector
short)
__a,
__b);
666 vector
bool short __b) {
667 return __builtin_altivec_vaddshs(
__a, (vector
short)
__b);
672 return __builtin_altivec_vadduhs(
__a,
__b);
677 return __builtin_altivec_vadduhs((vector
unsigned short)
__a,
__b);
682 return __builtin_altivec_vadduhs(
__a, (vector
unsigned short)
__b);
687 return __builtin_altivec_vaddsws(
__a,
__b);
692 return __builtin_altivec_vaddsws((vector
int)
__a,
__b);
696 vector
bool int __b) {
697 return __builtin_altivec_vaddsws(
__a, (vector
int)
__b);
702 return __builtin_altivec_vadduws(
__a,
__b);
707 return __builtin_altivec_vadduws((vector
unsigned int)
__a,
__b);
712 return __builtin_altivec_vadduws(
__a, (vector
unsigned int)
__b);
719 return __builtin_altivec_vaddsbs(
__a,
__b);
724 return __builtin_altivec_vaddsbs((vector
signed char)
__a,
__b);
729 return __builtin_altivec_vaddsbs(
__a, (vector
signed char)
__b);
736 return __builtin_altivec_vaddubs(
__a,
__b);
741 return __builtin_altivec_vaddubs((vector
unsigned char)
__a,
__b);
746 return __builtin_altivec_vaddubs(
__a, (vector
unsigned char)
__b);
753 return __builtin_altivec_vaddshs(
__a,
__b);
758 return __builtin_altivec_vaddshs((vector
short)
__a,
__b);
762 vector
bool short __b) {
763 return __builtin_altivec_vaddshs(
__a, (vector
short)
__b);
770 return __builtin_altivec_vadduhs(
__a,
__b);
775 return __builtin_altivec_vadduhs((vector
unsigned short)
__a,
__b);
780 return __builtin_altivec_vadduhs(
__a, (vector
unsigned short)
__b);
787 return __builtin_altivec_vaddsws(
__a,
__b);
792 return __builtin_altivec_vaddsws((vector
int)
__a,
__b);
796 vector
bool int __b) {
797 return __builtin_altivec_vaddsws(
__a, (vector
int)
__b);
804 return __builtin_altivec_vadduws(
__a,
__b);
809 return __builtin_altivec_vadduws((vector
unsigned int)
__a,
__b);
814 return __builtin_altivec_vadduws(
__a, (vector
unsigned int)
__b);
817#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
818 defined(__SIZEOF_INT128__)
822vec_vadduqm(vector
signed __int128
__a, vector
signed __int128
__b) {
827vec_vadduqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
834vec_vaddeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
835 vector
signed __int128
__c) {
836 return (vector
signed __int128)__builtin_altivec_vaddeuqm(
837 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
838 (vector
unsigned __int128)
__c);
842vec_vaddeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
843 vector
unsigned __int128
__c) {
844 return __builtin_altivec_vaddeuqm(
__a,
__b,
__c);
850vec_vaddcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
851 return (vector
signed __int128)__builtin_altivec_vaddcuq(
852 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
856vec_vaddcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
857 return __builtin_altivec_vaddcuq(
__a,
__b);
863vec_vaddecuq(vector
signed __int128
__a, vector
signed __int128
__b,
864 vector
signed __int128
__c) {
865 return (vector
signed __int128)__builtin_altivec_vaddecuq(
866 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
867 (vector
unsigned __int128)
__c);
871vec_vaddecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
872 vector
unsigned __int128
__c) {
873 return __builtin_altivec_vaddecuq(
__a,
__b,
__c);
879#define __builtin_altivec_vand vec_and
888 return (vector
signed char)
__a &
__b;
893 return __a & (vector
signed char)
__b;
903 return (vector
unsigned char)
__a &
__b;
908 return __a & (vector
unsigned char)
__b;
912 vector
bool char __b) {
923 return (vector
short)
__a &
__b;
927 vector
bool short __b) {
928 return __a & (vector short)
__b;
938 return (vector
unsigned short)
__a &
__b;
943 return __a & (vector
unsigned short)
__b;
958 return (vector
int)
__a &
__b;
962 vector
bool int __b) {
973 return (vector
unsigned int)
__a &
__b;
982 vector
bool int __b) {
988 vector
unsigned int __res =
989 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
990 return (vector
float)__res;
995 vector
unsigned int __res =
996 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
997 return (vector
float)__res;
1001 vector
bool int __b) {
1002 vector
unsigned int __res =
1003 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1004 return (vector
float)__res;
1009 vector
double __b) {
1010 vector
unsigned long long __res =
1011 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1012 return (vector
double)__res;
1017 vector
unsigned long long __res =
1018 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1019 return (vector
double)__res;
1023 vector
double __b) {
1024 vector
unsigned long long __res =
1025 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1026 return (vector
double)__res;
1030vec_and(vector
signed long long __a, vector
signed long long __b) {
1035vec_and(vector
bool long long __a, vector
signed long long __b) {
1036 return (vector
signed long long)
__a &
__b;
1040vec_and(vector
signed long long __a, vector
bool long long __b) {
1041 return __a & (vector
signed long long)
__b;
1044static __inline__ vector
unsigned long long __ATTRS_o_ai
1045vec_and(vector
unsigned long long __a, vector
unsigned long long __b) {
1049static __inline__ vector
unsigned long long __ATTRS_o_ai
1050vec_and(vector
bool long long __a, vector
unsigned long long __b) {
1051 return (vector
unsigned long long)
__a &
__b;
1054static __inline__ vector
unsigned long long __ATTRS_o_ai
1055vec_and(vector
unsigned long long __a, vector
bool long long __b) {
1056 return __a & (vector
unsigned long long)
__b;
1060vec_and(vector
bool long long __a, vector
bool long long __b) {
1074 return (vector
signed char)
__a &
__b;
1079 return __a & (vector
signed char)
__b;
1089 return (vector
unsigned char)
__a &
__b;
1094 return __a & (vector
unsigned char)
__b;
1098 vector
bool char __b) {
1109 return (vector
short)
__a &
__b;
1113 vector
bool short __b) {
1114 return __a & (vector short)
__b;
1124 return (vector
unsigned short)
__a &
__b;
1129 return __a & (vector
unsigned short)
__b;
1144 return (vector
int)
__a &
__b;
1148 vector
bool int __b) {
1159 return (vector
unsigned int)
__a &
__b;
1168 vector
bool int __b) {
1174 vector
unsigned int __res =
1175 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1176 return (vector
float)__res;
1181 vector
unsigned int __res =
1182 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1183 return (vector
float)__res;
1187 vector
bool int __b) {
1188 vector
unsigned int __res =
1189 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1190 return (vector
float)__res;
1195vec_vand(vector
signed long long __a, vector
signed long long __b) {
1200vec_vand(vector
bool long long __a, vector
signed long long __b) {
1201 return (vector
signed long long)
__a &
__b;
1205vec_vand(vector
signed long long __a, vector
bool long long __b) {
1206 return __a & (vector
signed long long)
__b;
1209static __inline__ vector
unsigned long long __ATTRS_o_ai
1210vec_vand(vector
unsigned long long __a, vector
unsigned long long __b) {
1214static __inline__ vector
unsigned long long __ATTRS_o_ai
1215vec_vand(vector
bool long long __a, vector
unsigned long long __b) {
1216 return (vector
unsigned long long)
__a &
__b;
1219static __inline__ vector
unsigned long long __ATTRS_o_ai
1220vec_vand(vector
unsigned long long __a, vector
bool long long __b) {
1221 return __a & (vector
unsigned long long)
__b;
1232#define __builtin_altivec_vandc vec_andc
1241 return (vector
signed char)
__a & ~__b;
1246 return __a & ~(vector
signed char)
__b;
1256 return (vector
unsigned char)
__a & ~__b;
1261 return __a & ~(vector
unsigned char)
__b;
1265 vector
bool char __b) {
1276 return (vector
short)
__a & ~__b;
1280 vector
bool short __b) {
1281 return __a & ~(vector short)
__b;
1291 return (vector
unsigned short)
__a & ~__b;
1296 return __a & ~(vector
unsigned short)
__b;
1311 return (vector
int)
__a & ~__b;
1315 vector
bool int __b) {
1326 return (vector
unsigned int)
__a & ~__b;
1335 vector
bool int __b) {
1341 vector
unsigned int __res =
1342 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1343 return (vector
float)__res;
1348 vector
unsigned int __res =
1349 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1350 return (vector
float)__res;
1354 vector
bool int __b) {
1355 vector
unsigned int __res =
1356 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1357 return (vector
float)__res;
1362 vector
double __b) {
1363 vector
unsigned long long __res =
1364 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1365 return (vector
double)__res;
1370 vector
unsigned long long __res =
1371 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1372 return (vector
double)__res;
1376 vector
double __b) {
1377 vector
unsigned long long __res =
1378 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1379 return (vector
double)__res;
1383vec_andc(vector
signed long long __a, vector
signed long long __b) {
1388vec_andc(vector
bool long long __a, vector
signed long long __b) {
1389 return (vector
signed long long)
__a & ~__b;
1393vec_andc(vector
signed long long __a, vector
bool long long __b) {
1394 return __a & ~(vector
signed long long)
__b;
1397static __inline__ vector
unsigned long long __ATTRS_o_ai
1398vec_andc(vector
unsigned long long __a, vector
unsigned long long __b) {
1402static __inline__ vector
unsigned long long __ATTRS_o_ai
1403vec_andc(vector
bool long long __a, vector
unsigned long long __b) {
1404 return (vector
unsigned long long)
__a & ~__b;
1407static __inline__ vector
unsigned long long __ATTRS_o_ai
1408vec_andc(vector
unsigned long long __a, vector
bool long long __b) {
1409 return __a & ~(vector
unsigned long long)
__b;
1427 return (vector
signed char)
__a & ~__b;
1432 return __a & ~(vector
signed char)
__b;
1442 return (vector
unsigned char)
__a & ~__b;
1447 return __a & ~(vector
unsigned char)
__b;
1462 return (vector
short)
__a & ~__b;
1466 vector
bool short __b) {
1467 return __a & ~(vector short)
__b;
1477 return (vector
unsigned short)
__a & ~__b;
1482 return __a & ~(vector
unsigned short)
__b;
1497 return (vector
int)
__a & ~__b;
1501 vector
bool int __b) {
1512 return (vector
unsigned int)
__a & ~__b;
1521 vector
bool int __b) {
1527 vector
unsigned int __res =
1528 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1529 return (vector
float)__res;
1534 vector
unsigned int __res =
1535 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1536 return (vector
float)__res;
1540 vector
bool int __b) {
1541 vector
unsigned int __res =
1542 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1543 return (vector
float)__res;
1554 return (vector
signed long long)
__a & ~__b;
1559 return __a & ~(vector
signed long long)
__b;
1562static __inline__ vector
unsigned long long __ATTRS_o_ai
1563vec_vandc(vector
unsigned long long __a, vector
unsigned long long __b) {
1567static __inline__ vector
unsigned long long __ATTRS_o_ai
1569 return (vector
unsigned long long)
__a & ~__b;
1572static __inline__ vector
unsigned long long __ATTRS_o_ai
1574 return __a & ~(vector
unsigned long long)
__b;
1587 return __builtin_altivec_vavgsb(
__a,
__b);
1592 return __builtin_altivec_vavgub(
__a,
__b);
1597 return __builtin_altivec_vavgsh(
__a,
__b);
1602 return __builtin_altivec_vavguh(
__a,
__b);
1607 return __builtin_altivec_vavgsw(
__a,
__b);
1612 return __builtin_altivec_vavguw(
__a,
__b);
1617static __inline__ vector
signed char __attribute__((__always_inline__))
1618vec_vavgsb(vector
signed char __a, vector
signed char __b) {
1619 return __builtin_altivec_vavgsb(
__a,
__b);
1624static __inline__ vector
unsigned char __attribute__((__always_inline__))
1625vec_vavgub(vector
unsigned char __a, vector
unsigned char __b) {
1626 return __builtin_altivec_vavgub(
__a,
__b);
1631static __inline__ vector
short __attribute__((__always_inline__))
1632vec_vavgsh(vector
short __a, vector
short __b) {
1633 return __builtin_altivec_vavgsh(
__a,
__b);
1638static __inline__ vector
unsigned short __attribute__((__always_inline__))
1639vec_vavguh(vector
unsigned short __a, vector
unsigned short __b) {
1640 return __builtin_altivec_vavguh(
__a,
__b);
1645static __inline__ vector
int __attribute__((__always_inline__))
1646vec_vavgsw(vector
int __a, vector
int __b) {
1647 return __builtin_altivec_vavgsw(
__a,
__b);
1652static __inline__ vector
unsigned int __attribute__((__always_inline__))
1653vec_vavguw(vector
unsigned int __a, vector
unsigned int __b) {
1654 return __builtin_altivec_vavguw(
__a,
__b);
1661 return __builtin_vsx_xvrspip(
__a);
1663 return __builtin_altivec_vrfip(
__a);
1669 return __builtin_vsx_xvrdpip(
__a);
1687vec_vrfip(vector
float __a) {
1688 return __builtin_altivec_vrfip(
__a);
1693static __inline__ vector
int __attribute__((__always_inline__))
1694vec_cmpb(vector
float __a, vector
float __b) {
1695 return __builtin_altivec_vcmpbfp(
__a,
__b);
1700static __inline__ vector
int __attribute__((__always_inline__))
1701vec_vcmpbfp(vector
float __a, vector
float __b) {
1702 return __builtin_altivec_vcmpbfp(
__a,
__b);
1709 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1715 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1721 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1727 return (vector
bool short)__builtin_altivec_vcmpequh(
__a,
__b);
1732 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)
__a,
1738 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)
__a,
1744 return (vector
bool int)__builtin_altivec_vcmpequw(
__a,
__b);
1749 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)
__a,
1754 vector
bool int __b) {
1755 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)
__a,
1759#ifdef __POWER8_VECTOR__
1762 return (vector
bool long long)__builtin_altivec_vcmpequd(
__a,
__b);
1766vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1767 return (vector
bool long long)__builtin_altivec_vcmpequd(
1768 (vector
long long)
__a, (vector
long long)
__b);
1773 return (vector
bool long long)__builtin_altivec_vcmpequd(
1774 (vector
long long)
__a, (vector
long long)
__b);
1776#elif defined(__VSX__)
1779 vector
bool int __wordcmp =
1781#ifdef __LITTLE_ENDIAN__
1782 __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 3, 0, 1, 2);
1783 return (vector
bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 1,
1786 __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 1, 2, 3, 0);
1787 return (vector
bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 0,
1793vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1794 return vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b);
1799 return vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b);
1806 return (vector
bool int)__builtin_vsx_xvcmpeqsp(
__a,
__b);
1808 return (vector
bool int)__builtin_altivec_vcmpeqfp(
__a,
__b);
1815 return (vector
bool long long)__builtin_vsx_xvcmpeqdp(
__a,
__b);
1819#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1822 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1823 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1827vec_cmpeq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
1828 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1829 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1834 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1835 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1839#ifdef __POWER9_VECTOR__
1844 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1850 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1856 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1862 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1868 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1874 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1880 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1886 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1892 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1898 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1902#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1904vec_cmpne(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
1905 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1906 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1911 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1912 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1917 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1918 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1925vec_cmpnez(vector
signed char __a, vector
signed char __b) {
1926 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)
__a,
1931vec_cmpnez(vector
unsigned char __a, vector
unsigned char __b) {
1932 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)
__a,
1937vec_cmpnez(vector
signed short __a, vector
signed short __b) {
1938 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)
__a,
1943vec_cmpnez(vector
unsigned short __a, vector
unsigned short __b) {
1944 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)
__a,
1949vec_cmpnez(vector
signed int __a, vector
signed int __b) {
1950 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)
__a,
1955vec_cmpnez(vector
unsigned int __a, vector
unsigned int __b) {
1956 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)
__a,
1961vec_cntlz_lsbb(vector
signed char __a) {
1962#ifdef __LITTLE_ENDIAN__
1963 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1965 return __builtin_altivec_vclzlsbb((vector
unsigned char)
__a);
1970vec_cntlz_lsbb(vector
unsigned char __a) {
1971#ifdef __LITTLE_ENDIAN__
1972 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1974 return __builtin_altivec_vclzlsbb(
__a);
1979vec_cnttz_lsbb(vector
signed char __a) {
1980#ifdef __LITTLE_ENDIAN__
1981 return __builtin_altivec_vclzlsbb((vector
unsigned char)
__a);
1983 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1988vec_cnttz_lsbb(vector
unsigned char __a) {
1989#ifdef __LITTLE_ENDIAN__
1990 return __builtin_altivec_vclzlsbb(
__a);
1992 return __builtin_altivec_vctzlsbb(
__a);
1997vec_parity_lsbb(vector
unsigned int __a) {
1998 return __builtin_altivec_vprtybw(
__a);
2002vec_parity_lsbb(vector
signed int __a) {
2003 return __builtin_altivec_vprtybw((vector
unsigned int)
__a);
2006#ifdef __SIZEOF_INT128__
2008vec_parity_lsbb(vector
unsigned __int128
__a) {
2009 return __builtin_altivec_vprtybq(
__a);
2013vec_parity_lsbb(vector
signed __int128
__a) {
2014 return __builtin_altivec_vprtybq((vector
unsigned __int128)
__a);
2018static __inline__ vector
unsigned long long __ATTRS_o_ai
2019vec_parity_lsbb(vector
unsigned long long __a) {
2020 return __builtin_altivec_vprtybd(
__a);
2023static __inline__ vector
unsigned long long __ATTRS_o_ai
2024vec_parity_lsbb(vector
signed long long __a) {
2025 return __builtin_altivec_vprtybd((vector
unsigned long long)
__a);
2082#ifdef __POWER8_VECTOR__
2085 return (vector
bool long long)
2086 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2091 return (vector
bool long long)
2092 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2096vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
2097 return (vector
bool long long)
2098 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2100#elif defined(__VSX__)
2103 return (vector
bool long long)~(
2104 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2109 return (vector
bool long long)~(
2110 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2114vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
2115 return (vector
bool long long)~(
2116 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2123 return (vector
bool long long)
2124 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2132 return (vector
bool char)__builtin_altivec_vcmpgtsb(
__a,
__b);
2137 return (vector
bool char)__builtin_altivec_vcmpgtub(
__a,
__b);
2142 return (vector
bool short)__builtin_altivec_vcmpgtsh(
__a,
__b);
2147 return (vector
bool short)__builtin_altivec_vcmpgtuh(
__a,
__b);
2152 return (vector
bool int)__builtin_altivec_vcmpgtsw(
__a,
__b);
2157 return (vector
bool int)__builtin_altivec_vcmpgtuw(
__a,
__b);
2160#ifdef __POWER8_VECTOR__
2163 return (vector
bool long long)__builtin_altivec_vcmpgtsd(
__a,
__b);
2167vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
2168 return (vector
bool long long)__builtin_altivec_vcmpgtud(
__a,
__b);
2170#elif defined(__VSX__)
2173 vector
signed int __sgtw = (vector
signed int)
vec_cmpgt(
2174 (vector
signed int)
__a, (vector
signed int)
__b);
2175 vector
unsigned int __ugtw = (vector
unsigned int)
vec_cmpgt(
2176 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
2177 vector
unsigned int __eqw = (vector
unsigned int)
vec_cmpeq(
2178 (vector
signed int)
__a, (vector
signed int)
__b);
2179#ifdef __LITTLE_ENDIAN__
2180 __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2181 __sgtw |= (vector
signed int)__ugtw;
2182 return (vector
bool long long)__builtin_shufflevector(__sgtw, __sgtw, 1, 1, 3,
2185 __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2186 __sgtw |= (vector
signed int)__ugtw;
2187 return (vector
bool long long)__builtin_shufflevector(__sgtw, __sgtw, 0, 0, 2,
2193vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
2194 vector
unsigned int __ugtw = (vector
unsigned int)
vec_cmpgt(
2195 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
2196 vector
unsigned int __eqw = (vector
unsigned int)
vec_cmpeq(
2197 (vector
signed int)
__a, (vector
signed int)
__b);
2198#ifdef __LITTLE_ENDIAN__
2199 __eqw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2201 return (vector
bool long long)__builtin_shufflevector(__ugtw, __ugtw, 1, 1, 3,
2204 __eqw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2206 return (vector
bool long long)__builtin_shufflevector(__ugtw, __ugtw, 0, 0, 2,
2215 return (vector
bool int)__builtin_vsx_xvcmpgtsp(
__a,
__b);
2217 return (vector
bool int)__builtin_altivec_vcmpgtfp(
__a,
__b);
2224 return (vector
bool long long)__builtin_vsx_xvcmpgtdp(
__a,
__b);
2228#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2231 return (vector
bool __int128)__builtin_altivec_vcmpgtsq(
__a,
__b);
2235vec_cmpgt(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2236 return (vector
bool __int128)__builtin_altivec_vcmpgtuq(
__a,
__b);
2275 return (vector
bool int)__builtin_vsx_xvcmpgesp(
__a,
__b);
2277 return (vector
bool int)__builtin_altivec_vcmpgefp(
__a,
__b);
2284 return (vector
bool long long)__builtin_vsx_xvcmpgedp(
__a,
__b);
2293vec_cmpge(vector
unsigned long long __a, vector
unsigned long long __b) {
2298#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2305vec_cmpge(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2312static __inline__ vector
bool int __attribute__((__always_inline__))
2313vec_vcmpgefp(vector
float __a, vector
float __b) {
2314 return (vector
bool int)__builtin_altivec_vcmpgefp(
__a,
__b);
2319static __inline__ vector
bool char __attribute__((__always_inline__))
2320vec_vcmpgtsb(vector
signed char __a, vector
signed char __b) {
2321 return (vector
bool char)__builtin_altivec_vcmpgtsb(
__a,
__b);
2326static __inline__ vector
bool char __attribute__((__always_inline__))
2327vec_vcmpgtub(vector
unsigned char __a, vector
unsigned char __b) {
2328 return (vector
bool char)__builtin_altivec_vcmpgtub(
__a,
__b);
2333static __inline__ vector
bool short __attribute__((__always_inline__))
2334vec_vcmpgtsh(vector
short __a, vector
short __b) {
2335 return (vector
bool short)__builtin_altivec_vcmpgtsh(
__a,
__b);
2340static __inline__ vector
bool short __attribute__((__always_inline__))
2341vec_vcmpgtuh(vector
unsigned short __a, vector
unsigned short __b) {
2342 return (vector
bool short)__builtin_altivec_vcmpgtuh(
__a,
__b);
2347static __inline__ vector
bool int __attribute__((__always_inline__))
2348vec_vcmpgtsw(vector
int __a, vector
int __b) {
2349 return (vector
bool int)__builtin_altivec_vcmpgtsw(
__a,
__b);
2354static __inline__ vector
bool int __attribute__((__always_inline__))
2355vec_vcmpgtuw(vector
unsigned int __a, vector
unsigned int __b) {
2356 return (vector
bool int)__builtin_altivec_vcmpgtuw(
__a,
__b);
2361static __inline__ vector
bool int __attribute__((__always_inline__))
2362vec_vcmpgtfp(vector
float __a, vector
float __b) {
2363 return (vector
bool int)__builtin_altivec_vcmpgtfp(
__a,
__b);
2415vec_cmple(vector
unsigned long long __a, vector
unsigned long long __b) {
2420#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2427vec_cmple(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2476#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2483vec_cmplt(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2495vec_cmplt(vector
unsigned long long __a, vector
unsigned long long __b) {
2500#ifdef __POWER8_VECTOR__
2504vec_popcnt(vector
signed char __a) {
2505 return (vector
unsigned char)__builtin_altivec_vpopcntb(
2506 (vector
unsigned char)
__a);
2509vec_popcnt(vector
unsigned char __a) {
2510 return __builtin_altivec_vpopcntb(
__a);
2513vec_popcnt(vector
signed short __a) {
2514 return (vector
unsigned short)__builtin_altivec_vpopcnth(
2515 (vector
unsigned short)
__a);
2518vec_popcnt(vector
unsigned short __a) {
2519 return __builtin_altivec_vpopcnth(
__a);
2522vec_popcnt(vector
signed int __a) {
2523 return __builtin_altivec_vpopcntw((vector
unsigned int)
__a);
2526vec_popcnt(vector
unsigned int __a) {
2527 return __builtin_altivec_vpopcntw(
__a);
2529static __inline__ vector
unsigned long long __ATTRS_o_ai
2530vec_popcnt(vector
signed long long __a) {
2531 return __builtin_altivec_vpopcntd((vector
unsigned long long)
__a);
2533static __inline__ vector
unsigned long long __ATTRS_o_ai
2534vec_popcnt(vector
unsigned long long __a) {
2535 return __builtin_altivec_vpopcntd(
__a);
2538#define vec_vclz vec_cntlz
2542vec_cntlz(vector
signed char __a) {
2543 return (vector
signed char)__builtin_altivec_vclzb((vector
unsigned char)
__a);
2546vec_cntlz(vector
unsigned char __a) {
2547 return __builtin_altivec_vclzb(
__a);
2550vec_cntlz(vector
signed short __a) {
2551 return (vector
signed short)__builtin_altivec_vclzh(
2552 (vector
unsigned short)
__a);
2555vec_cntlz(vector
unsigned short __a) {
2556 return __builtin_altivec_vclzh(
__a);
2559vec_cntlz(vector
signed int __a) {
2560 return (vector
signed int)__builtin_altivec_vclzw((vector
unsigned int)
__a);
2563vec_cntlz(vector
unsigned int __a) {
2564 return __builtin_altivec_vclzw(
__a);
2567vec_cntlz(vector
signed long long __a) {
2568 return (vector
signed long long)__builtin_altivec_vclzd(
2569 (vector
unsigned long long)
__a);
2571static __inline__ vector
unsigned long long __ATTRS_o_ai
2572vec_cntlz(vector
unsigned long long __a) {
2573 return __builtin_altivec_vclzd(
__a);
2577#ifdef __POWER9_VECTOR__
2582vec_cnttz(vector
signed char __a) {
2583 return (vector
signed char)__builtin_altivec_vctzb((vector
unsigned char)
__a);
2586vec_cnttz(vector
unsigned char __a) {
2587 return __builtin_altivec_vctzb(
__a);
2590vec_cnttz(vector
signed short __a) {
2591 return (vector
signed short)__builtin_altivec_vctzh(
2592 (vector
unsigned short)
__a);
2595vec_cnttz(vector
unsigned short __a) {
2596 return __builtin_altivec_vctzh(
__a);
2599vec_cnttz(vector
signed int __a) {
2600 return (vector
signed int)__builtin_altivec_vctzw((vector
unsigned int)
__a);
2603vec_cnttz(vector
unsigned int __a) {
2604 return __builtin_altivec_vctzw(
__a);
2607vec_cnttz(vector
signed long long __a) {
2608 return (vector
signed long long)__builtin_altivec_vctzd(
2609 (vector
unsigned long long)
__a);
2611static __inline__ vector
unsigned long long __ATTRS_o_ai
2612vec_cnttz(vector
unsigned long long __a) {
2613 return __builtin_altivec_vctzd(
__a);
2619vec_first_match_index(vector
signed char __a, vector
signed char __b) {
2620 vector
unsigned long long __res =
2621#ifdef __LITTLE_ENDIAN__
2626 if (__res[0] == 64) {
2627 return (__res[1] + 64) >> 3;
2629 return __res[0] >> 3;
2633vec_first_match_index(vector
unsigned char __a, vector
unsigned char __b) {
2634 vector
unsigned long long __res =
2635#ifdef __LITTLE_ENDIAN__
2640 if (__res[0] == 64) {
2641 return (__res[1] + 64) >> 3;
2643 return __res[0] >> 3;
2647vec_first_match_index(vector
signed short __a, vector
signed short __b) {
2648 vector
unsigned long long __res =
2649#ifdef __LITTLE_ENDIAN__
2654 if (__res[0] == 64) {
2655 return (__res[1] + 64) >> 4;
2657 return __res[0] >> 4;
2661vec_first_match_index(vector
unsigned short __a, vector
unsigned short __b) {
2662 vector
unsigned long long __res =
2663#ifdef __LITTLE_ENDIAN__
2668 if (__res[0] == 64) {
2669 return (__res[1] + 64) >> 4;
2671 return __res[0] >> 4;
2675vec_first_match_index(vector
signed int __a, vector
signed int __b) {
2676 vector
unsigned long long __res =
2677#ifdef __LITTLE_ENDIAN__
2682 if (__res[0] == 64) {
2683 return (__res[1] + 64) >> 5;
2685 return __res[0] >> 5;
2689vec_first_match_index(vector
unsigned int __a, vector
unsigned int __b) {
2690 vector
unsigned long long __res =
2691#ifdef __LITTLE_ENDIAN__
2696 if (__res[0] == 64) {
2697 return (__res[1] + 64) >> 5;
2699 return __res[0] >> 5;
2705vec_first_match_or_eos_index(vector
signed char __a, vector
signed char __b) {
2711 vector
bool char __tmp2 = __tmp1 |
2715 vector
unsigned long long __res =
2716#ifdef __LITTLE_ENDIAN__
2717 vec_cnttz((vector
unsigned long long)__tmp2);
2719 vec_cntlz((vector
unsigned long long)__tmp2);
2721 if (__res[0] == 64) {
2722 return (__res[1] + 64) >> 3;
2724 return __res[0] >> 3;
2728vec_first_match_or_eos_index(vector
unsigned char __a,
2729 vector
unsigned char __b) {
2731 vector
bool char __tmp2 = __tmp1 |
2735 vector
unsigned long long __res =
2736#ifdef __LITTLE_ENDIAN__
2737 vec_cnttz((vector
unsigned long long)__tmp2);
2739 vec_cntlz((vector
unsigned long long)__tmp2);
2741 if (__res[0] == 64) {
2742 return (__res[1] + 64) >> 3;
2744 return __res[0] >> 3;
2748vec_first_match_or_eos_index(vector
signed short __a, vector
signed short __b) {
2750 vector
bool short __tmp2 = __tmp1 |
2754 vector
unsigned long long __res =
2755#ifdef __LITTLE_ENDIAN__
2756 vec_cnttz((vector
unsigned long long)__tmp2);
2758 vec_cntlz((vector
unsigned long long)__tmp2);
2760 if (__res[0] == 64) {
2761 return (__res[1] + 64) >> 4;
2763 return __res[0] >> 4;
2767vec_first_match_or_eos_index(vector
unsigned short __a,
2768 vector
unsigned short __b) {
2770 vector
bool short __tmp2 = __tmp1 |
2774 vector
unsigned long long __res =
2775#ifdef __LITTLE_ENDIAN__
2776 vec_cnttz((vector
unsigned long long)__tmp2);
2778 vec_cntlz((vector
unsigned long long)__tmp2);
2780 if (__res[0] == 64) {
2781 return (__res[1] + 64) >> 4;
2783 return __res[0] >> 4;
2787vec_first_match_or_eos_index(vector
signed int __a, vector
signed int __b) {
2789 vector
bool int __tmp2 = __tmp1 |
vec_cmpeq((vector
signed int)__tmp1,
__a) |
2792 vector
unsigned long long __res =
2793#ifdef __LITTLE_ENDIAN__
2794 vec_cnttz((vector
unsigned long long)__tmp2);
2796 vec_cntlz((vector
unsigned long long)__tmp2);
2798 if (__res[0] == 64) {
2799 return (__res[1] + 64) >> 5;
2801 return __res[0] >> 5;
2805vec_first_match_or_eos_index(vector
unsigned int __a, vector
unsigned int __b) {
2807 vector
bool int __tmp2 = __tmp1 |
2811 vector
unsigned long long __res =
2812#ifdef __LITTLE_ENDIAN__
2813 vec_cnttz((vector
unsigned long long)__tmp2);
2815 vec_cntlz((vector
unsigned long long)__tmp2);
2817 if (__res[0] == 64) {
2818 return (__res[1] + 64) >> 5;
2820 return __res[0] >> 5;
2826vec_first_mismatch_index(vector
signed char __a, vector
signed char __b) {
2827 vector
unsigned long long __res =
2828#ifdef __LITTLE_ENDIAN__
2833 if (__res[0] == 64) {
2834 return (__res[1] + 64) >> 3;
2836 return __res[0] >> 3;
2840vec_first_mismatch_index(vector
unsigned char __a, vector
unsigned char __b) {
2841 vector
unsigned long long __res =
2842#ifdef __LITTLE_ENDIAN__
2847 if (__res[0] == 64) {
2848 return (__res[1] + 64) >> 3;
2850 return __res[0] >> 3;
2854vec_first_mismatch_index(vector
signed short __a, vector
signed short __b) {
2855 vector
unsigned long long __res =
2856#ifdef __LITTLE_ENDIAN__
2861 if (__res[0] == 64) {
2862 return (__res[1] + 64) >> 4;
2864 return __res[0] >> 4;
2868vec_first_mismatch_index(vector
unsigned short __a, vector
unsigned short __b) {
2869 vector
unsigned long long __res =
2870#ifdef __LITTLE_ENDIAN__
2875 if (__res[0] == 64) {
2876 return (__res[1] + 64) >> 4;
2878 return __res[0] >> 4;
2882vec_first_mismatch_index(vector
signed int __a, vector
signed int __b) {
2883 vector
unsigned long long __res =
2884#ifdef __LITTLE_ENDIAN__
2889 if (__res[0] == 64) {
2890 return (__res[1] + 64) >> 5;
2892 return __res[0] >> 5;
2896vec_first_mismatch_index(vector
unsigned int __a, vector
unsigned int __b) {
2897 vector
unsigned long long __res =
2898#ifdef __LITTLE_ENDIAN__
2903 if (__res[0] == 64) {
2904 return (__res[1] + 64) >> 5;
2906 return __res[0] >> 5;
2912vec_first_mismatch_or_eos_index(vector
signed char __a,
2913 vector
signed char __b) {
2914 vector
unsigned long long __res =
2915#ifdef __LITTLE_ENDIAN__
2916 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2918 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2920 if (__res[0] == 64) {
2921 return (__res[1] + 64) >> 3;
2923 return __res[0] >> 3;
2927vec_first_mismatch_or_eos_index(vector
unsigned char __a,
2928 vector
unsigned char __b) {
2929 vector
unsigned long long __res =
2930#ifdef __LITTLE_ENDIAN__
2931 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2933 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2935 if (__res[0] == 64) {
2936 return (__res[1] + 64) >> 3;
2938 return __res[0] >> 3;
2942vec_first_mismatch_or_eos_index(vector
signed short __a,
2943 vector
signed short __b) {
2944 vector
unsigned long long __res =
2945#ifdef __LITTLE_ENDIAN__
2946 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2948 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2950 if (__res[0] == 64) {
2951 return (__res[1] + 64) >> 4;
2953 return __res[0] >> 4;
2957vec_first_mismatch_or_eos_index(vector
unsigned short __a,
2958 vector
unsigned short __b) {
2959 vector
unsigned long long __res =
2960#ifdef __LITTLE_ENDIAN__
2961 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2963 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2965 if (__res[0] == 64) {
2966 return (__res[1] + 64) >> 4;
2968 return __res[0] >> 4;
2972vec_first_mismatch_or_eos_index(vector
signed int __a, vector
signed int __b) {
2973 vector
unsigned long long __res =
2974#ifdef __LITTLE_ENDIAN__
2975 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2977 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2979 if (__res[0] == 64) {
2980 return (__res[1] + 64) >> 5;
2982 return __res[0] >> 5;
2986vec_first_mismatch_or_eos_index(vector
unsigned int __a,
2987 vector
unsigned int __b) {
2988 vector
unsigned long long __res =
2989#ifdef __LITTLE_ENDIAN__
2990 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2992 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2994 if (__res[0] == 64) {
2995 return (__res[1] + 64) >> 5;
2997 return __res[0] >> 5;
3001vec_insert_exp(vector
double __a, vector
unsigned long long __b) {
3002 return __builtin_vsx_xviexpdp((vector
unsigned long long)
__a,
__b);
3006vec_insert_exp(vector
unsigned long long __a, vector
unsigned long long __b) {
3007 return __builtin_vsx_xviexpdp(
__a,
__b);
3011vec_insert_exp(vector
float __a, vector
unsigned int __b) {
3012 return __builtin_vsx_xviexpsp((vector
unsigned int)
__a,
__b);
3016vec_insert_exp(vector
unsigned int __a, vector
unsigned int __b) {
3017 return __builtin_vsx_xviexpsp(
__a,
__b);
3020#if defined(__powerpc64__)
3021static __inline__ vector
signed char __ATTRS_o_ai vec_xl_len(
const signed char *
__a,
3023 return (vector
signed char)__builtin_vsx_lxvl(
__a, (
__b << 56));
3027vec_xl_len(
const unsigned char *
__a,
size_t __b) {
3028 return (vector
unsigned char)__builtin_vsx_lxvl(
__a, (
__b << 56));
3031static __inline__ vector
signed short __ATTRS_o_ai vec_xl_len(
const signed short *
__a,
3033 return (vector
signed short)__builtin_vsx_lxvl(
__a, (
__b << 56));
3037vec_xl_len(
const unsigned short *
__a,
size_t __b) {
3038 return (vector
unsigned short)__builtin_vsx_lxvl(
__a, (
__b << 56));
3041static __inline__ vector
signed int __ATTRS_o_ai vec_xl_len(
const signed int *
__a,
3043 return (vector
signed int)__builtin_vsx_lxvl(
__a, (
__b << 56));
3046static __inline__ vector
unsigned int __ATTRS_o_ai vec_xl_len(
const unsigned int *
__a,
3048 return (vector
unsigned int)__builtin_vsx_lxvl(
__a, (
__b << 56));
3051static __inline__ vector
float __ATTRS_o_ai vec_xl_len(
const float *
__a,
size_t __b) {
3052 return (vector
float)__builtin_vsx_lxvl(
__a, (
__b << 56));
3055#ifdef __SIZEOF_INT128__
3057vec_xl_len(
const signed __int128 *
__a,
size_t __b) {
3058 return (vector
signed __int128)__builtin_vsx_lxvl(
__a, (
__b << 56));
3062vec_xl_len(
const unsigned __int128 *
__a,
size_t __b) {
3063 return (vector
unsigned __int128)__builtin_vsx_lxvl(
__a, (
__b << 56));
3068vec_xl_len(
const signed long long *
__a,
size_t __b) {
3069 return (vector
signed long long)__builtin_vsx_lxvl(
__a, (
__b << 56));
3072static __inline__ vector
unsigned long long __ATTRS_o_ai
3073vec_xl_len(
const unsigned long long *
__a,
size_t __b) {
3074 return (vector
unsigned long long)__builtin_vsx_lxvl(
__a, (
__b << 56));
3077static __inline__ vector
double __ATTRS_o_ai vec_xl_len(
const double *
__a,
3079 return (vector
double)__builtin_vsx_lxvl(
__a, (
__b << 56));
3083vec_xl_len_r(
const unsigned char *
__a,
size_t __b) {
3084 vector
unsigned char __res =
3085 (vector
unsigned char)__builtin_vsx_lxvll(
__a, (
__b << 56));
3086 vector
unsigned char __mask =
3087 (vector
unsigned char)__builtin_altivec_lvsr(16 -
__b, (
int *)
NULL);
3088 return (vector
unsigned char)__builtin_altivec_vperm_4si(
3089 (vector
int)__res, (vector
int)__res, __mask);
3093static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned char __a,
3096 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3099static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed char __a,
3100 signed char *
__b,
size_t __c) {
3101 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3104static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed short __a,
3105 signed short *
__b,
size_t __c) {
3106 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3109static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned short __a,
3110 unsigned short *
__b,
3112 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3116 signed int *
__b,
size_t __c) {
3117 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3120static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned int __a,
3121 unsigned int *
__b,
size_t __c) {
3122 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3127 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3130#ifdef __SIZEOF_INT128__
3131static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed __int128
__a,
3132 signed __int128 *
__b,
3134 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3137static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned __int128
__a,
3138 unsigned __int128 *
__b,
3140 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3144static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed long long __a,
3145 signed long long *
__b,
3147 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3150static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned long long __a,
3151 unsigned long long *
__b,
3153 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3158 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3161static __inline__
void __ATTRS_o_ai vec_xst_len_r(vector
unsigned char __a,
3164 vector
unsigned char __mask =
3165 (vector
unsigned char)__builtin_altivec_lvsl(16 -
__c, (
int *)
NULL);
3166 vector
unsigned char __res =
3167 (vector
unsigned char)__builtin_altivec_vperm_4si(
3168 (vector
int)
__a, (vector
int)
__a, __mask);
3169 return __builtin_vsx_stxvll((vector
int)__res,
__b, (
__c << 56));
3174#if defined(__POWER9_VECTOR__) && defined(__powerpc64__)
3175#define __vec_ldrmb(PTR, CNT) vec_xl_len_r((const unsigned char *)(PTR), (CNT))
3176#define __vec_strmb(PTR, CNT, VAL) \
3177 vec_xst_len_r((VAL), (unsigned char *)(PTR), (CNT))
3179#define __vec_ldrmb __builtin_vsx_ldrmb
3180#define __vec_strmb __builtin_vsx_strmb
3186static __inline__ vector
float __ATTRS_o_ai vec_cpsgn(vector
float __a,
3188 return __builtin_vsx_xvcpsgnsp(
__b,
__a);
3191static __inline__ vector
double __ATTRS_o_ai vec_cpsgn(vector
double __a,
3192 vector
double __b) {
3193 return __builtin_vsx_xvcpsgndp(
__b,
__a);
3203#ifdef __XL_COMPAT_ALTIVEC__
3204#define vec_ctf(__a, __b) \
3207 : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3208 vector unsigned int \
3209 : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3211 vector unsigned long long \
3212 : (vector float)(__builtin_vsx_xvcvuxdsp( \
3213 (vector unsigned long long)(__a)) * \
3214 (vector float)(vector unsigned)((0x7f - (__b)) << 23)), \
3215 vector signed long long \
3216 : (vector float)(__builtin_vsx_xvcvsxdsp( \
3217 (vector signed long long)(__a)) * \
3218 (vector float)(vector unsigned)((0x7f - (__b)) << 23)))
3220#define vec_ctf(__a, __b) \
3223 : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3224 vector unsigned int \
3225 : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3227 vector unsigned long long \
3228 : (vector float)(__builtin_convertvector( \
3229 (vector unsigned long long)(__a), vector double) * \
3230 (vector double)(vector unsigned long long)((0x3ffULL - \
3233 vector signed long long \
3234 : (vector float)(__builtin_convertvector((vector signed long long)(__a), \
3236 (vector double)(vector unsigned long long)((0x3ffULL - \
3241#define vec_ctf(__a, __b) \
3242 _Generic((__a), vector int \
3243 : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3244 vector unsigned int \
3245 : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3251#define vec_ctd(__a, __b) \
3252 _Generic((__a), vector signed int \
3253 : (vec_doublee((vector signed int)(__a)) * \
3254 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3256 vector unsigned int \
3257 : (vec_doublee((vector unsigned int)(__a)) * \
3258 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3260 vector unsigned long long \
3261 : (__builtin_convertvector((vector unsigned long long)(__a), \
3263 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3265 vector signed long long \
3266 : (__builtin_convertvector((vector signed long long)(__a), \
3268 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3274#define vec_vcfux __builtin_altivec_vcfux
3277#define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b))
3282#ifdef __XL_COMPAT_ALTIVEC__
3283#define vec_cts(__a, __b) \
3284 _Generic((__a), vector float \
3285 : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3289 vector double __ret = \
3290 (vector double)(__a) * \
3291 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3293 (vector signed long long)__builtin_vsx_xvcvdpsxws(__ret); \
3296#define vec_cts(__a, __b) \
3297 _Generic((__a), vector float \
3298 : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3302 vector double __ret = \
3303 (vector double)(__a) * \
3304 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3306 (vector signed long long)__builtin_convertvector( \
3307 __ret, vector signed long long); \
3311#define vec_cts __builtin_altivec_vctsxs
3316#define vec_vctsxs __builtin_altivec_vctsxs
3321#ifdef __XL_COMPAT_ALTIVEC__
3322#define vec_ctu(__a, __b) \
3323 _Generic((__a), vector float \
3324 : (vector unsigned int)__builtin_altivec_vctuxs( \
3325 (vector float)(__a), (__b)), \
3328 vector double __ret = \
3329 (vector double)(__a) * \
3330 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3332 (vector unsigned long long)__builtin_vsx_xvcvdpuxws(__ret); \
3335#define vec_ctu(__a, __b) \
3336 _Generic((__a), vector float \
3337 : (vector unsigned int)__builtin_altivec_vctuxs( \
3338 (vector float)(__a), (__b)), \
3341 vector double __ret = \
3342 (vector double)(__a) * \
3343 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3345 (vector unsigned long long)__builtin_convertvector( \
3346 __ret, vector unsigned long long); \
3350#define vec_ctu __builtin_altivec_vctuxs
3353#ifdef __LITTLE_ENDIAN__
3357#define vec_ctsl(__a, __b) \
3358 _Generic((__a), vector float \
3360 vector float __ret = \
3361 (vector float)(__a) * \
3362 (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3363 __builtin_vsx_xvcvspsxds( \
3364 __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3368 vector double __ret = \
3369 (vector double)(__a) * \
3370 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3372 __builtin_convertvector(__ret, vector signed long long); \
3377#define vec_ctul(__a, __b) \
3378 _Generic((__a), vector float \
3380 vector float __ret = \
3381 (vector float)(__a) * \
3382 (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3383 __builtin_vsx_xvcvspuxds( \
3384 __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3388 vector double __ret = \
3389 (vector double)(__a) * \
3390 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3392 __builtin_convertvector(__ret, vector unsigned long long); \
3399#define vec_ctsl(__a, __b) \
3400 _Generic((__a), vector float \
3402 vector float __ret = \
3403 (vector float)(__a) * \
3404 (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3405 __builtin_vsx_xvcvspsxds(__ret); \
3409 vector double __ret = \
3410 (vector double)(__a) * \
3411 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3413 __builtin_convertvector(__ret, vector signed long long); \
3418#define vec_ctul(__a, __b) \
3419 _Generic((__a), vector float \
3421 vector float __ret = \
3422 (vector float)(__a) * \
3423 (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3424 __builtin_vsx_xvcvspuxds(__ret); \
3428 vector double __ret = \
3429 (vector double)(__a) * \
3430 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3432 __builtin_convertvector(__ret, vector unsigned long long); \
3439#define vec_vctuxs __builtin_altivec_vctuxs
3443#ifdef __POWER9_VECTOR__
3445vec_signexti(vector
signed char __a) {
3446 return __builtin_altivec_vextsb2w(
__a);
3450vec_signexti(vector
signed short __a) {
3451 return __builtin_altivec_vextsh2w(
__a);
3455vec_signextll(vector
signed char __a) {
3456 return __builtin_altivec_vextsb2d(
__a);
3460vec_signextll(vector
signed short __a) {
3461 return __builtin_altivec_vextsh2d(
__a);
3465vec_signextll(vector
signed int __a) {
3466 return __builtin_altivec_vextsw2d(
__a);
3470#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3472vec_signextq(vector
signed long long __a) {
3473 return __builtin_altivec_vextsd2q(
__a);
3480vec_sld(vector
signed int, vector
signed int,
unsigned const int __c);
3484 return __builtin_convertvector(
__a, vector
signed int);
3490 return __builtin_convertvector(
__a, vector
signed long long);
3493static __inline__ vector
signed int __attribute__((__always_inline__))
3494vec_signed2(vector
double __a, vector
double __b) {
3495 return (vector
signed int) {
__a[0],
__a[1],
__b[0],
__b[1] };
3499vec_signede(vector
double __a) {
3500#ifdef __LITTLE_ENDIAN__
3501 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(
__a);
3502 return vec_sld(__ret, __ret, 12);
3504 return __builtin_vsx_xvcvdpsxws(
__a);
3509vec_signedo(vector
double __a) {
3510#ifdef __LITTLE_ENDIAN__
3511 return __builtin_vsx_xvcvdpsxws(
__a);
3513 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(
__a);
3514 return vec_sld(__ret, __ret, 12);
3522vec_sld(vector
unsigned int, vector
unsigned int,
unsigned const int __c);
3526 return __builtin_convertvector(
__a, vector
unsigned int);
3530static __inline__ vector
unsigned long long __ATTRS_o_ai
3532 return __builtin_convertvector(
__a, vector
unsigned long long);
3535static __inline__ vector
unsigned int __attribute__((__always_inline__))
3536vec_unsigned2(vector
double __a, vector
double __b) {
3537 return (vector
unsigned int) {
__a[0],
__a[1],
__b[0],
__b[1] };
3541vec_unsignede(vector
double __a) {
3542#ifdef __LITTLE_ENDIAN__
3543 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(
__a);
3544 return vec_sld(__ret, __ret, 12);
3546 return __builtin_vsx_xvcvdpuxws(
__a);
3551vec_unsignedo(vector
double __a) {
3552#ifdef __LITTLE_ENDIAN__
3553 return __builtin_vsx_xvcvdpuxws(
__a);
3555 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(
__a);
3556 return vec_sld(__ret, __ret, 12);
3564vec_sld(vector
float, vector
float,
unsigned const int __c);
3568 return __builtin_convertvector(
__a, vector
float);
3573 return __builtin_convertvector(
__a, vector
float);
3578vec_float2(vector
signed long long __a, vector
signed long long __b) {
3579 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3583vec_float2(vector
unsigned long long __a, vector
unsigned long long __b) {
3584 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3588vec_float2(vector
double __a, vector
double __b) {
3589 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3593vec_floate(vector
signed long long __a) {
3594#ifdef __LITTLE_ENDIAN__
3595 vector
float __ret = __builtin_vsx_xvcvsxdsp(
__a);
3596 return vec_sld(__ret, __ret, 12);
3598 return __builtin_vsx_xvcvsxdsp(
__a);
3603vec_floate(vector
unsigned long long __a) {
3604#ifdef __LITTLE_ENDIAN__
3605 vector
float __ret = __builtin_vsx_xvcvuxdsp(
__a);
3606 return vec_sld(__ret, __ret, 12);
3608 return __builtin_vsx_xvcvuxdsp(
__a);
3613vec_floate(vector
double __a) {
3614#ifdef __LITTLE_ENDIAN__
3615 vector
float __ret = __builtin_vsx_xvcvdpsp(
__a);
3616 return vec_sld(__ret, __ret, 12);
3618 return __builtin_vsx_xvcvdpsp(
__a);
3623vec_floato(vector
signed long long __a) {
3624#ifdef __LITTLE_ENDIAN__
3625 return __builtin_vsx_xvcvsxdsp(
__a);
3627 vector
float __ret = __builtin_vsx_xvcvsxdsp(
__a);
3628 return vec_sld(__ret, __ret, 12);
3633vec_floato(vector
unsigned long long __a) {
3634#ifdef __LITTLE_ENDIAN__
3635 return __builtin_vsx_xvcvuxdsp(
__a);
3637 vector
float __ret = __builtin_vsx_xvcvuxdsp(
__a);
3638 return vec_sld(__ret, __ret, 12);
3643vec_floato(vector
double __a) {
3644#ifdef __LITTLE_ENDIAN__
3645 return __builtin_vsx_xvcvdpsp(
__a);
3647 vector
float __ret = __builtin_vsx_xvcvdpsp(
__a);
3648 return vec_sld(__ret, __ret, 12);
3657vec_double(vector
signed long long __a) {
3658 return __builtin_convertvector(
__a, vector
double);
3662vec_double(vector
unsigned long long __a) {
3663 return __builtin_convertvector(
__a, vector
double);
3667vec_doublee(vector
signed int __a) {
3668#ifdef __LITTLE_ENDIAN__
3671 return __builtin_vsx_xvcvsxwdp(
__a);
3676vec_doublee(vector
unsigned int __a) {
3677#ifdef __LITTLE_ENDIAN__
3680 return __builtin_vsx_xvcvuxwdp(
__a);
3685vec_doublee(vector
float __a) {
3686#ifdef __LITTLE_ENDIAN__
3689 return __builtin_vsx_xvcvspdp(
__a);
3694vec_doubleh(vector
signed int __a) {
3695 vector
double __ret = {
__a[0],
__a[1]};
3700vec_doubleh(vector
unsigned int __a) {
3701 vector
double __ret = {
__a[0],
__a[1]};
3706vec_doubleh(vector
float __a) {
3707 vector
double __ret = {
__a[0],
__a[1]};
3712vec_doublel(vector
signed int __a) {
3713 vector
double __ret = {
__a[2],
__a[3]};
3718vec_doublel(vector
unsigned int __a) {
3719 vector
double __ret = {
__a[2],
__a[3]};
3724vec_doublel(vector
float __a) {
3725 vector
double __ret = {
__a[2],
__a[3]};
3730vec_doubleo(vector
signed int __a) {
3731#ifdef __LITTLE_ENDIAN__
3732 return __builtin_vsx_xvcvsxwdp(
__a);
3739vec_doubleo(vector
unsigned int __a) {
3740#ifdef __LITTLE_ENDIAN__
3741 return __builtin_vsx_xvcvuxwdp(
__a);
3748vec_doubleo(vector
float __a) {
3749#ifdef __LITTLE_ENDIAN__
3750 return __builtin_vsx_xvcvspdp(
__a);
3757static __inline__ vector
double __ATTRS_o_ai vec_cvf(vector
float __a) {
3758 return vec_doublee(
__a);
3761static __inline__ vector
float __ATTRS_o_ai vec_cvf(vector
double __a) {
3762 return vec_floate(
__a);
3803vec_div(vector
signed long long __a, vector
signed long long __b) {
3807static __inline__ vector
unsigned long long __ATTRS_o_ai
3808vec_div(vector
unsigned long long __a, vector
unsigned long long __b) {
3818 vector
double __b) {
3825#ifdef __POWER10_VECTOR__
3827vec_dive(vector
signed int __a, vector
signed int __b) {
3828 return __builtin_altivec_vdivesw(
__a,
__b);
3832vec_dive(vector
unsigned int __a, vector
unsigned int __b) {
3833 return __builtin_altivec_vdiveuw(
__a,
__b);
3837vec_dive(vector
signed long long __a, vector
signed long long __b) {
3838 return __builtin_altivec_vdivesd(
__a,
__b);
3841static __inline__ vector
unsigned long long __ATTRS_o_ai
3842vec_dive(vector
unsigned long long __a, vector
unsigned long long __b) {
3843 return __builtin_altivec_vdiveud(
__a,
__b);
3846#ifdef __SIZEOF_INT128__
3848vec_dive(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
3849 return __builtin_altivec_vdiveuq(
__a,
__b);
3853vec_dive(vector
signed __int128
__a, vector
signed __int128
__b) {
3854 return __builtin_altivec_vdivesq(
__a,
__b);
3859#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3861vec_div(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
3866vec_div(vector
signed __int128
__a, vector
signed __int128
__b) {
3875 vector
double __b) {
3876 return __builtin_vsx_xvtdivdp(
__a,
__b);
3881 return __builtin_vsx_xvtdivsp(
__a,
__b);
3887#define vec_dss __builtin_altivec_dss
3891static __inline__
void __attribute__((__always_inline__)) vec_dssall(
void) {
3892 __builtin_altivec_dssall();
3896#define vec_dst(__PTR, __CW, __STR) \
3897 __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR))
3900#define vec_dstst(__PTR, __CW, __STR) \
3901 __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR))
3904#define vec_dststt(__PTR, __CW, __STR) \
3905 __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR))
3908#define vec_dstt(__PTR, __CW, __STR) \
3909 __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR))
3913#ifdef __POWER8_VECTOR__
3915vec_eqv(vector
signed char __a, vector
signed char __b) {
3916 return (vector
signed char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3917 (vector
unsigned int)
__b);
3921vec_eqv(vector
unsigned char __a, vector
unsigned char __b) {
3922 return (vector
unsigned char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3923 (vector
unsigned int)
__b);
3926static __inline__ vector
bool char __ATTRS_o_ai vec_eqv(vector
bool char __a,
3927 vector
bool char __b) {
3928 return (vector
bool char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3929 (vector
unsigned int)
__b);
3933vec_eqv(vector
signed short __a, vector
signed short __b) {
3934 return (vector
signed short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3935 (vector
unsigned int)
__b);
3939vec_eqv(vector
unsigned short __a, vector
unsigned short __b) {
3940 return (vector
unsigned short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3941 (vector
unsigned int)
__b);
3945vec_eqv(vector
bool short __a, vector
bool short __b) {
3946 return (vector
bool short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3947 (vector
unsigned int)
__b);
3951vec_eqv(vector
signed int __a, vector
signed int __b) {
3952 return (vector
signed int)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3953 (vector
unsigned int)
__b);
3957vec_eqv(vector
unsigned int __a, vector
unsigned int __b) {
3958 return __builtin_vsx_xxleqv(
__a,
__b);
3961static __inline__ vector
bool int __ATTRS_o_ai vec_eqv(vector
bool int __a,
3962 vector
bool int __b) {
3963 return (vector
bool int)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3964 (vector
unsigned int)
__b);
3968vec_eqv(vector
signed long long __a, vector
signed long long __b) {
3969 return (vector
signed long long)__builtin_vsx_xxleqv(
3970 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
3973static __inline__ vector
unsigned long long __ATTRS_o_ai
3974vec_eqv(vector
unsigned long long __a, vector
unsigned long long __b) {
3975 return (vector
unsigned long long)__builtin_vsx_xxleqv(
3976 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
3980vec_eqv(vector
bool long long __a, vector
bool long long __b) {
3981 return (vector
bool long long)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3982 (vector
unsigned int)
__b);
3987 return (vector
float)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3988 (vector
unsigned int)
__b);
3991static __inline__ vector
double __ATTRS_o_ai vec_eqv(vector
double __a,
3992 vector
double __b) {
3993 return (vector
double)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3994 (vector
unsigned int)
__b);
4000static __inline__ vector
float __attribute__((__always_inline__))
4001vec_expte(vector
float __a) {
4002 return __builtin_altivec_vexptefp(
__a);
4007static __inline__ vector
float __attribute__((__always_inline__))
4008vec_vexptefp(vector
float __a) {
4009 return __builtin_altivec_vexptefp(
__a);
4016 return __builtin_vsx_xvrspim(
__a);
4018 return __builtin_altivec_vrfim(
__a);
4024 return __builtin_vsx_xvrdpim(
__a);
4041static __inline__ vector
float __attribute__((__always_inline__))
4042vec_vrfim(vector
float __a) {
4043 return __builtin_altivec_vrfim(
__a);
4050 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4055 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4060 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4065 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4070 return (vector
bool char)__builtin_altivec_lvx(
__a,
__b);
4074 const vector
short *
__b) {
4075 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4079 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4084 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4089 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4094 return (vector
bool short)__builtin_altivec_lvx(
__a,
__b);
4098 const vector pixel *
__b) {
4099 return (vector pixel)__builtin_altivec_lvx(
__a,
__b);
4103 const vector
int *
__b) {
4104 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4108 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4113 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4118 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4123 return (vector
bool int)__builtin_altivec_lvx(
__a,
__b);
4127 const vector
float *
__b) {
4128 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4132 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4139 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4144 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4149 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4154 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4159 return (vector
bool char)__builtin_altivec_lvx(
__a,
__b);
4163 const vector
short *
__b) {
4164 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4168 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4173 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4178 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4183 return (vector
bool short)__builtin_altivec_lvx(
__a,
__b);
4187 const vector pixel *
__b) {
4188 return (vector pixel)__builtin_altivec_lvx(
__a,
__b);
4192 const vector
int *
__b) {
4193 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4197 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4202 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4207 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4212 return (vector
bool int)__builtin_altivec_lvx(
__a,
__b);
4216 const vector
float *
__b) {
4217 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4221 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4228 return (vector
signed char)__builtin_altivec_lvebx(
__a,
__b);
4233 return (vector
unsigned char)__builtin_altivec_lvebx(
__a,
__b);
4237 return (vector
short)__builtin_altivec_lvehx(
__a,
__b);
4242 return (vector
unsigned short)__builtin_altivec_lvehx(
__a,
__b);
4246 return (vector
int)__builtin_altivec_lvewx(
__a,
__b);
4251 return (vector
unsigned int)__builtin_altivec_lvewx(
__a,
__b);
4255 return (vector
float)__builtin_altivec_lvewx(
__a,
__b);
4262 return (vector
signed char)__builtin_altivec_lvebx(
__a,
__b);
4267 return (vector
unsigned char)__builtin_altivec_lvebx(
__a,
__b);
4274 return (vector
short)__builtin_altivec_lvehx(
__a,
__b);
4279 return (vector
unsigned short)__builtin_altivec_lvehx(
__a,
__b);
4285 return (vector
int)__builtin_altivec_lvewx(
__a,
__b);
4290 return (vector
unsigned int)__builtin_altivec_lvewx(
__a,
__b);
4295 return (vector
float)__builtin_altivec_lvewx(
__a,
__b);
4302 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4307 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4312 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4317 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4322 return (vector
bool char)__builtin_altivec_lvxl(
__a,
__b);
4326 const vector
short *
__b) {
4327 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4331 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4336 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4341 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4346 return (vector
bool short)__builtin_altivec_lvxl(
__a,
__b);
4350 const vector pixel *
__b) {
4351 return (vector pixel
short)__builtin_altivec_lvxl(
__a,
__b);
4355 const vector
int *
__b) {
4356 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4360 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4365 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4370 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4375 return (vector
bool int)__builtin_altivec_lvxl(
__a,
__b);
4379 const vector
float *
__b) {
4380 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4384 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4391 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4396 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4401 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4406 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4411 return (vector
bool char)__builtin_altivec_lvxl(
__a,
__b);
4415 const vector
short *
__b) {
4416 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4421 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4426 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4431 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4436 return (vector
bool short)__builtin_altivec_lvxl(
__a,
__b);
4440 const vector pixel *
__b) {
4441 return (vector pixel)__builtin_altivec_lvxl(
__a,
__b);
4445 const vector
int *
__b) {
4446 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4450 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4455 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4460 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4465 return (vector
bool int)__builtin_altivec_lvxl(
__a,
__b);
4469 const vector
float *
__b) {
4470 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4475 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4480static __inline__ vector
float __attribute__((__always_inline__))
4481vec_loge(vector
float __a) {
4482 return __builtin_altivec_vlogefp(
__a);
4487static __inline__ vector
float __attribute__((__always_inline__))
4488vec_vlogefp(vector
float __a) {
4489 return __builtin_altivec_vlogefp(
__a);
4494#ifdef __LITTLE_ENDIAN__
4496 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4498 vector
unsigned char mask =
4499 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4500 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4501 7, 6, 5, 4, 3, 2, 1, 0};
4502 return vec_perm(mask, mask, reverse);
4507 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4511#ifdef __LITTLE_ENDIAN__
4513 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4515 vector
unsigned char mask =
4516 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4517 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4518 7, 6, 5, 4, 3, 2, 1, 0};
4519 return vec_perm(mask, mask, reverse);
4524 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4528#ifdef __LITTLE_ENDIAN__
4530 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4532 vector
unsigned char mask =
4533 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4534 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4535 7, 6, 5, 4, 3, 2, 1, 0};
4536 return vec_perm(mask, mask, reverse);
4541 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4545#ifdef __LITTLE_ENDIAN__
4547 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4549 vector
unsigned char mask =
4550 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4551 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4552 7, 6, 5, 4, 3, 2, 1, 0};
4553 return vec_perm(mask, mask, reverse);
4558 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4562#ifdef __LITTLE_ENDIAN__
4564 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4566 vector
unsigned char mask =
4567 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4568 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4569 7, 6, 5, 4, 3, 2, 1, 0};
4570 return vec_perm(mask, mask, reverse);
4575 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4579#ifdef __LITTLE_ENDIAN__
4581 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4583 vector
unsigned char mask =
4584 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4585 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4586 7, 6, 5, 4, 3, 2, 1, 0};
4587 return vec_perm(mask, mask, reverse);
4592 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4596#ifdef __LITTLE_ENDIAN__
4598 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4600 vector
unsigned char mask =
4601 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4602 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4603 7, 6, 5, 4, 3, 2, 1, 0};
4604 return vec_perm(mask, mask, reverse);
4609 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4615#ifdef __LITTLE_ENDIAN__
4617 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4619 vector
unsigned char mask =
4620 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4621 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4622 7, 6, 5, 4, 3, 2, 1, 0};
4623 return vec_perm(mask, mask, reverse);
4628 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4632#ifdef __LITTLE_ENDIAN__
4634 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4636 vector
unsigned char mask =
4637 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4638 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4639 7, 6, 5, 4, 3, 2, 1, 0};
4640 return vec_perm(mask, mask, reverse);
4645 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4649#ifdef __LITTLE_ENDIAN__
4651 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4653 vector
unsigned char mask =
4654 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4655 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4656 7, 6, 5, 4, 3, 2, 1, 0};
4657 return vec_perm(mask, mask, reverse);
4662 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4666#ifdef __LITTLE_ENDIAN__
4668 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4670 vector
unsigned char mask =
4671 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4672 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4673 7, 6, 5, 4, 3, 2, 1, 0};
4674 return vec_perm(mask, mask, reverse);
4679 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4683#ifdef __LITTLE_ENDIAN__
4685 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4687 vector
unsigned char mask =
4688 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4689 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4690 7, 6, 5, 4, 3, 2, 1, 0};
4691 return vec_perm(mask, mask, reverse);
4696 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4700#ifdef __LITTLE_ENDIAN__
4702 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4704 vector
unsigned char mask =
4705 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4706 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4707 7, 6, 5, 4, 3, 2, 1, 0};
4708 return vec_perm(mask, mask, reverse);
4713 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4717#ifdef __LITTLE_ENDIAN__
4719 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4721 vector
unsigned char mask =
4722 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4723 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4724 7, 6, 5, 4, 3, 2, 1, 0};
4725 return vec_perm(mask, mask, reverse);
4730 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4736vec_mladd(vector
signed short, vector
signed short, vector
signed short);
4738vec_mladd(vector
signed short, vector
unsigned short, vector
unsigned short);
4740vec_mladd(vector
unsigned short, vector
signed short, vector
signed short);
4742vec_mladd(vector
unsigned short, vector
unsigned short, vector
unsigned short);
4745 vector
signed short __a, vector
signed short __b, vector
signed short __c) {
4751 vector
unsigned short __c) {
4757 vector
signed short __c) {
4763 vector
unsigned short __c) {
4771 return __builtin_vsx_xvmaddasp(
__a,
__b,
__c);
4773 return __builtin_altivec_vmaddfp(
__a,
__b,
__c);
4780 vector
double __c) {
4781 return __builtin_vsx_xvmaddadp(
__a,
__b,
__c);
4787static __inline__ vector
float __attribute__((__always_inline__))
4788vec_vmaddfp(vector
float __a, vector
float __b, vector
float __c) {
4789 return __builtin_altivec_vmaddfp(
__a,
__b,
__c);
4794static __inline__ vector
signed short __attribute__((__always_inline__))
4795vec_madds(vector
signed short __a, vector
signed short __b,
4796 vector
signed short __c) {
4797 return __builtin_altivec_vmhaddshs(
__a,
__b,
__c);
4801static __inline__ vector
signed short __attribute__((__always_inline__))
4802vec_vmhaddshs(vector
signed short __a, vector
signed short __b,
4803 vector
signed short __c) {
4804 return __builtin_altivec_vmhaddshs(
__a,
__b,
__c);
4813 return __builtin_vsx_xvmsubasp(
__a,
__b,
__c);
4816static __inline__ vector
double __ATTRS_o_ai vec_msub(vector
double __a,
4818 vector
double __c) {
4819 return __builtin_vsx_xvmsubadp(
__a,
__b,
__c);
4827 return __builtin_altivec_vmaxsb(
__a,
__b);
4832 return __builtin_altivec_vmaxsb((vector
signed char)
__a,
__b);
4837 return __builtin_altivec_vmaxsb(
__a, (vector
signed char)
__b);
4842 return __builtin_altivec_vmaxub(
__a,
__b);
4847 return __builtin_altivec_vmaxub((vector
unsigned char)
__a,
__b);
4852 return __builtin_altivec_vmaxub(
__a, (vector
unsigned char)
__b);
4857 return __builtin_altivec_vmaxsh(
__a,
__b);
4862 return __builtin_altivec_vmaxsh((vector
short)
__a,
__b);
4866 vector
bool short __b) {
4867 return __builtin_altivec_vmaxsh(
__a, (vector
short)
__b);
4872 return __builtin_altivec_vmaxuh(
__a,
__b);
4877 return __builtin_altivec_vmaxuh((vector
unsigned short)
__a,
__b);
4882 return __builtin_altivec_vmaxuh(
__a, (vector
unsigned short)
__b);
4887 return __builtin_altivec_vmaxsw(
__a,
__b);
4892 return __builtin_altivec_vmaxsw((vector
int)
__a,
__b);
4896 vector
bool int __b) {
4897 return __builtin_altivec_vmaxsw(
__a, (vector
int)
__b);
4902 return __builtin_altivec_vmaxuw(
__a,
__b);
4907 return __builtin_altivec_vmaxuw((vector
unsigned int)
__a,
__b);
4912 return __builtin_altivec_vmaxuw(
__a, (vector
unsigned int)
__b);
4915#ifdef __POWER8_VECTOR__
4917vec_max(vector
signed long long __a, vector
signed long long __b) {
4918 return __builtin_altivec_vmaxsd(
__a,
__b);
4922vec_max(vector
bool long long __a, vector
signed long long __b) {
4923 return __builtin_altivec_vmaxsd((vector
signed long long)
__a,
__b);
4927vec_max(vector
signed long long __a, vector
bool long long __b) {
4928 return __builtin_altivec_vmaxsd(
__a, (vector
signed long long)
__b);
4931static __inline__ vector
unsigned long long __ATTRS_o_ai
4932vec_max(vector
unsigned long long __a, vector
unsigned long long __b) {
4933 return __builtin_altivec_vmaxud(
__a,
__b);
4936static __inline__ vector
unsigned long long __ATTRS_o_ai
4937vec_max(vector
bool long long __a, vector
unsigned long long __b) {
4938 return __builtin_altivec_vmaxud((vector
unsigned long long)
__a,
__b);
4941static __inline__ vector
unsigned long long __ATTRS_o_ai
4942vec_max(vector
unsigned long long __a, vector
bool long long __b) {
4943 return __builtin_altivec_vmaxud(
__a, (vector
unsigned long long)
__b);
4950 return __builtin_vsx_xvmaxsp(
__a,
__b);
4952 return __builtin_altivec_vmaxfp(
__a,
__b);
4958 vector
double __b) {
4959 return __builtin_vsx_xvmaxdp(
__a,
__b);
4967 return __builtin_altivec_vmaxsb(
__a,
__b);
4972 return __builtin_altivec_vmaxsb((vector
signed char)
__a,
__b);
4977 return __builtin_altivec_vmaxsb(
__a, (vector
signed char)
__b);
4984 return __builtin_altivec_vmaxub(
__a,
__b);
4989 return __builtin_altivec_vmaxub((vector
unsigned char)
__a,
__b);
4994 return __builtin_altivec_vmaxub(
__a, (vector
unsigned char)
__b);
5001 return __builtin_altivec_vmaxsh(
__a,
__b);
5006 return __builtin_altivec_vmaxsh((vector
short)
__a,
__b);
5010 vector
bool short __b) {
5011 return __builtin_altivec_vmaxsh(
__a, (vector
short)
__b);
5018 return __builtin_altivec_vmaxuh(
__a,
__b);
5023 return __builtin_altivec_vmaxuh((vector
unsigned short)
__a,
__b);
5028 return __builtin_altivec_vmaxuh(
__a, (vector
unsigned short)
__b);
5035 return __builtin_altivec_vmaxsw(
__a,
__b);
5040 return __builtin_altivec_vmaxsw((vector
int)
__a,
__b);
5044 vector
bool int __b) {
5045 return __builtin_altivec_vmaxsw(
__a, (vector
int)
__b);
5052 return __builtin_altivec_vmaxuw(
__a,
__b);
5057 return __builtin_altivec_vmaxuw((vector
unsigned int)
__a,
__b);
5062 return __builtin_altivec_vmaxuw(
__a, (vector
unsigned int)
__b);
5067static __inline__ vector
float __attribute__((__always_inline__))
5068vec_vmaxfp(vector
float __a, vector
float __b) {
5070 return __builtin_vsx_xvmaxsp(
__a,
__b);
5072 return __builtin_altivec_vmaxfp(
__a,
__b);
5081 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5082 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5083 0x06, 0x16, 0x07, 0x17));
5089 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5090 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5091 0x06, 0x16, 0x07, 0x17));
5097 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5098 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5099 0x06, 0x16, 0x07, 0x17));
5105 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5106 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5107 0x06, 0x07, 0x16, 0x17));
5113 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5114 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5115 0x06, 0x07, 0x16, 0x17));
5121 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5122 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5123 0x06, 0x07, 0x16, 0x17));
5129 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5130 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5131 0x06, 0x07, 0x16, 0x17));
5137 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5138 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5139 0x14, 0x15, 0x16, 0x17));
5145 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5146 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5147 0x14, 0x15, 0x16, 0x17));
5151 vector
bool int __b) {
5153 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5154 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5155 0x14, 0x15, 0x16, 0x17));
5161 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5162 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5163 0x14, 0x15, 0x16, 0x17));
5170 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5171 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5172 0x14, 0x15, 0x16, 0x17));
5178 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5179 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5180 0x14, 0x15, 0x16, 0x17));
5186 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5187 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5188 0x14, 0x15, 0x16, 0x17));
5191static __inline__ vector
unsigned long long __ATTRS_o_ai
5194 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5195 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5196 0x14, 0x15, 0x16, 0x17));
5199static __inline__ vector
unsigned long long __ATTRS_o_ai
5202 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5203 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5204 0x14, 0x15, 0x16, 0x17));
5207static __inline__ vector
unsigned long long __ATTRS_o_ai
5210 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5211 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5212 0x14, 0x15, 0x16, 0x17));
5218 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5219 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5220 0x14, 0x15, 0x16, 0x17));
5224 vector
double __b) {
5226 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5227 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5228 0x14, 0x15, 0x16, 0x17));
5233 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5234 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5235 0x14, 0x15, 0x16, 0x17));
5240 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5241 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5242 0x14, 0x15, 0x16, 0x17));
5248#define __builtin_altivec_vmrghb vec_vmrghb
5253 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5254 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5255 0x06, 0x16, 0x07, 0x17));
5261 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5262 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5263 0x06, 0x16, 0x07, 0x17));
5269 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5270 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5271 0x06, 0x16, 0x07, 0x17));
5276#define __builtin_altivec_vmrghh vec_vmrghh
5281 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5282 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5283 0x06, 0x07, 0x16, 0x17));
5289 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5290 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5291 0x06, 0x07, 0x16, 0x17));
5297 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5298 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5299 0x06, 0x07, 0x16, 0x17));
5305 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5306 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5307 0x06, 0x07, 0x16, 0x17));
5312#define __builtin_altivec_vmrghw vec_vmrghw
5317 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5318 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5319 0x14, 0x15, 0x16, 0x17));
5325 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5326 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5327 0x14, 0x15, 0x16, 0x17));
5331 vector
bool int __b) {
5333 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5334 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5335 0x14, 0x15, 0x16, 0x17));
5341 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5342 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5343 0x14, 0x15, 0x16, 0x17));
5351 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5352 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5353 0x0E, 0x1E, 0x0F, 0x1F));
5359 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5360 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5361 0x0E, 0x1E, 0x0F, 0x1F));
5367 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5368 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5369 0x0E, 0x1E, 0x0F, 0x1F));
5375 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5376 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5377 0x0E, 0x0F, 0x1E, 0x1F));
5383 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5384 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5385 0x0E, 0x0F, 0x1E, 0x1F));
5391 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5392 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5393 0x0E, 0x0F, 0x1E, 0x1F));
5399 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5400 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5401 0x0E, 0x0F, 0x1E, 0x1F));
5407 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5408 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5409 0x1C, 0x1D, 0x1E, 0x1F));
5415 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5416 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5417 0x1C, 0x1D, 0x1E, 0x1F));
5421 vector
bool int __b) {
5423 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5424 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5425 0x1C, 0x1D, 0x1E, 0x1F));
5431 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5432 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5433 0x1C, 0x1D, 0x1E, 0x1F));
5440 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5441 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5442 0x1C, 0x1D, 0x1E, 0x1F));
5447 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5448 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5449 0x1C, 0x1D, 0x1E, 0x1F));
5454 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5455 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5456 0x1C, 0x1D, 0x1E, 0x1F));
5458static __inline__ vector
unsigned long long __ATTRS_o_ai
5461 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5462 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5463 0x1C, 0x1D, 0x1E, 0x1F));
5465static __inline__ vector
unsigned long long __ATTRS_o_ai
5468 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5469 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5470 0x1C, 0x1D, 0x1E, 0x1F));
5472static __inline__ vector
unsigned long long __ATTRS_o_ai
5475 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5476 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5477 0x1C, 0x1D, 0x1E, 0x1F));
5482 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5483 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5484 0x1C, 0x1D, 0x1E, 0x1F));
5487 vector
double __b) {
5489 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5490 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5491 0x1C, 0x1D, 0x1E, 0x1F));
5496 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5497 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5498 0x1C, 0x1D, 0x1E, 0x1F));
5503 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5504 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5505 0x1C, 0x1D, 0x1E, 0x1F));
5511#define __builtin_altivec_vmrglb vec_vmrglb
5516 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5517 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5518 0x0E, 0x1E, 0x0F, 0x1F));
5524 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5525 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5526 0x0E, 0x1E, 0x0F, 0x1F));
5532 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5533 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5534 0x0E, 0x1E, 0x0F, 0x1F));
5539#define __builtin_altivec_vmrglh vec_vmrglh
5544 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5545 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5546 0x0E, 0x0F, 0x1E, 0x1F));
5552 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5553 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5554 0x0E, 0x0F, 0x1E, 0x1F));
5560 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5561 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5562 0x0E, 0x0F, 0x1E, 0x1F));
5568 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5569 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5570 0x0E, 0x0F, 0x1E, 0x1F));
5575#define __builtin_altivec_vmrglw vec_vmrglw
5580 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5581 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5582 0x1C, 0x1D, 0x1E, 0x1F));
5588 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5589 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5590 0x1C, 0x1D, 0x1E, 0x1F));
5594 vector
bool int __b) {
5596 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5597 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5598 0x1C, 0x1D, 0x1E, 0x1F));
5604 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5605 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5606 0x1C, 0x1D, 0x1E, 0x1F));
5609#ifdef __POWER8_VECTOR__
5612static __inline__ vector
bool int __ATTRS_o_ai vec_mergee(vector
bool int __a,
5613 vector
bool int __b) {
5615 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5616 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5617 0x18, 0x19, 0x1A, 0x1B));
5621vec_mergee(vector
signed int __a, vector
signed int __b) {
5623 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5624 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5625 0x18, 0x19, 0x1A, 0x1B));
5629vec_mergee(vector
unsigned int __a, vector
unsigned int __b) {
5631 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5632 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5633 0x18, 0x19, 0x1A, 0x1B));
5637vec_mergee(vector
bool long long __a, vector
bool long long __b) {
5642vec_mergee(vector
signed long long __a, vector
signed long long __b) {
5646static __inline__ vector
unsigned long long __ATTRS_o_ai
5647vec_mergee(vector
unsigned long long __a, vector
unsigned long long __b) {
5652vec_mergee(vector
float __a, vector
float __b) {
5654 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5655 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5656 0x18, 0x19, 0x1A, 0x1B));
5660vec_mergee(vector
double __a, vector
double __b) {
5666static __inline__ vector
bool int __ATTRS_o_ai vec_mergeo(vector
bool int __a,
5667 vector
bool int __b) {
5669 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5670 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5671 0x1C, 0x1D, 0x1E, 0x1F));
5675vec_mergeo(vector
signed int __a, vector
signed int __b) {
5677 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5678 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5679 0x1C, 0x1D, 0x1E, 0x1F));
5683vec_mergeo(vector
unsigned int __a, vector
unsigned int __b) {
5685 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5686 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5687 0x1C, 0x1D, 0x1E, 0x1F));
5691vec_mergeo(vector
bool long long __a, vector
bool long long __b) {
5696vec_mergeo(vector
signed long long __a, vector
signed long long __b) {
5700static __inline__ vector
unsigned long long __ATTRS_o_ai
5701vec_mergeo(vector
unsigned long long __a, vector
unsigned long long __b) {
5706vec_mergeo(vector
float __a, vector
float __b) {
5708 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5709 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5710 0x1C, 0x1D, 0x1E, 0x1F));
5714vec_mergeo(vector
double __a, vector
double __b) {
5722static __inline__ vector
unsigned short __attribute__((__always_inline__))
5724 return __builtin_altivec_mfvscr();
5731 return __builtin_altivec_vminsb(
__a,
__b);
5736 return __builtin_altivec_vminsb((vector
signed char)
__a,
__b);
5741 return __builtin_altivec_vminsb(
__a, (vector
signed char)
__b);
5746 return __builtin_altivec_vminub(
__a,
__b);
5751 return __builtin_altivec_vminub((vector
unsigned char)
__a,
__b);
5756 return __builtin_altivec_vminub(
__a, (vector
unsigned char)
__b);
5761 return __builtin_altivec_vminsh(
__a,
__b);
5766 return __builtin_altivec_vminsh((vector
short)
__a,
__b);
5770 vector
bool short __b) {
5771 return __builtin_altivec_vminsh(
__a, (vector
short)
__b);
5776 return __builtin_altivec_vminuh(
__a,
__b);
5781 return __builtin_altivec_vminuh((vector
unsigned short)
__a,
__b);
5786 return __builtin_altivec_vminuh(
__a, (vector
unsigned short)
__b);
5791 return __builtin_altivec_vminsw(
__a,
__b);
5796 return __builtin_altivec_vminsw((vector
int)
__a,
__b);
5800 vector
bool int __b) {
5801 return __builtin_altivec_vminsw(
__a, (vector
int)
__b);
5806 return __builtin_altivec_vminuw(
__a,
__b);
5811 return __builtin_altivec_vminuw((vector
unsigned int)
__a,
__b);
5816 return __builtin_altivec_vminuw(
__a, (vector
unsigned int)
__b);
5819#ifdef __POWER8_VECTOR__
5821vec_min(vector
signed long long __a, vector
signed long long __b) {
5822 return __builtin_altivec_vminsd(
__a,
__b);
5826vec_min(vector
bool long long __a, vector
signed long long __b) {
5827 return __builtin_altivec_vminsd((vector
signed long long)
__a,
__b);
5831vec_min(vector
signed long long __a, vector
bool long long __b) {
5832 return __builtin_altivec_vminsd(
__a, (vector
signed long long)
__b);
5835static __inline__ vector
unsigned long long __ATTRS_o_ai
5836vec_min(vector
unsigned long long __a, vector
unsigned long long __b) {
5837 return __builtin_altivec_vminud(
__a,
__b);
5840static __inline__ vector
unsigned long long __ATTRS_o_ai
5841vec_min(vector
bool long long __a, vector
unsigned long long __b) {
5842 return __builtin_altivec_vminud((vector
unsigned long long)
__a,
__b);
5845static __inline__ vector
unsigned long long __ATTRS_o_ai
5846vec_min(vector
unsigned long long __a, vector
bool long long __b) {
5847 return __builtin_altivec_vminud(
__a, (vector
unsigned long long)
__b);
5854 return __builtin_vsx_xvminsp(
__a,
__b);
5856 return __builtin_altivec_vminfp(
__a,
__b);
5862 vector
double __b) {
5863 return __builtin_vsx_xvmindp(
__a,
__b);
5871 return __builtin_altivec_vminsb(
__a,
__b);
5876 return __builtin_altivec_vminsb((vector
signed char)
__a,
__b);
5881 return __builtin_altivec_vminsb(
__a, (vector
signed char)
__b);
5888 return __builtin_altivec_vminub(
__a,
__b);
5893 return __builtin_altivec_vminub((vector
unsigned char)
__a,
__b);
5898 return __builtin_altivec_vminub(
__a, (vector
unsigned char)
__b);
5905 return __builtin_altivec_vminsh(
__a,
__b);
5910 return __builtin_altivec_vminsh((vector
short)
__a,
__b);
5914 vector
bool short __b) {
5915 return __builtin_altivec_vminsh(
__a, (vector
short)
__b);
5922 return __builtin_altivec_vminuh(
__a,
__b);
5927 return __builtin_altivec_vminuh((vector
unsigned short)
__a,
__b);
5932 return __builtin_altivec_vminuh(
__a, (vector
unsigned short)
__b);
5939 return __builtin_altivec_vminsw(
__a,
__b);
5944 return __builtin_altivec_vminsw((vector
int)
__a,
__b);
5948 vector
bool int __b) {
5949 return __builtin_altivec_vminsw(
__a, (vector
int)
__b);
5956 return __builtin_altivec_vminuw(
__a,
__b);
5961 return __builtin_altivec_vminuw((vector
unsigned int)
__a,
__b);
5966 return __builtin_altivec_vminuw(
__a, (vector
unsigned int)
__b);
5971static __inline__ vector
float __attribute__((__always_inline__))
5972vec_vminfp(vector
float __a, vector
float __b) {
5974 return __builtin_vsx_xvminsp(
__a,
__b);
5976 return __builtin_altivec_vminfp(
__a,
__b);
5982#define __builtin_altivec_vmladduhm vec_mladd
5991 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5992 return __a * (vector short)
__b + (vector
short)
__c;
6003 vector
unsigned short __c) {
6016 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
6017 return __a * (vector short)
__b + (vector
short)
__c;
6027 vector
unsigned short __c) {
6033static __inline__ vector
short __attribute__((__always_inline__))
6034vec_mradds(vector
short __a, vector
short __b, vector
short __c) {
6035 return __builtin_altivec_vmhraddshs(
__a,
__b,
__c);
6040static __inline__ vector
short __attribute__((__always_inline__))
6041vec_vmhraddshs(vector
short __a, vector
short __b, vector
short __c) {
6042 return __builtin_altivec_vmhraddshs(
__a,
__b,
__c);
6048 vector
unsigned char __b,
6050 return __builtin_altivec_vmsummbm(
__a,
__b,
__c);
6055 vector
unsigned int __c) {
6056 return __builtin_altivec_vmsumubm(
__a,
__b,
__c);
6062 return __builtin_altivec_vmsumshm(
__a,
__b,
__c);
6067 vector
unsigned int __c) {
6068 return __builtin_altivec_vmsumuhm(
__a,
__b,
__c);
6073#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6075vec_msumc(vector
unsigned long long __a, vector
unsigned long long __b,
6076 vector
unsigned __int128
__c) {
6077 return __builtin_altivec_vmsumcud(
__a,
__b,
__c);
6083static __inline__ vector
int __attribute__((__always_inline__))
6084vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
6085 return __builtin_altivec_vmsummbm(
__a,
__b,
__c);
6090static __inline__ vector
unsigned int __attribute__((__always_inline__))
6091vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
6092 vector
unsigned int __c) {
6093 return __builtin_altivec_vmsumubm(
__a,
__b,
__c);
6098static __inline__ vector
int __attribute__((__always_inline__))
6099vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
6100 return __builtin_altivec_vmsumshm(
__a,
__b,
__c);
6105static __inline__ vector
unsigned int __attribute__((__always_inline__))
6106vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
6107 vector
unsigned int __c) {
6108 return __builtin_altivec_vmsumuhm(
__a,
__b,
__c);
6116 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6121 vector
unsigned int __c) {
6122 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6127static __inline__ vector
int __attribute__((__always_inline__))
6128vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
6129 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6134static __inline__ vector
unsigned int __attribute__((__always_inline__))
6135vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
6136 vector
unsigned int __c) {
6137 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6143 __builtin_altivec_mtvscr((vector
int)
__a);
6147 __builtin_altivec_mtvscr((vector
int)
__a);
6151 __builtin_altivec_mtvscr((vector
int)
__a);
6155 __builtin_altivec_mtvscr((vector
int)
__a);
6159 __builtin_altivec_mtvscr((vector
int)
__a);
6163 __builtin_altivec_mtvscr((vector
int)
__a);
6167 __builtin_altivec_mtvscr((vector
int)
__a);
6171 __builtin_altivec_mtvscr((vector
int)
__a);
6175 __builtin_altivec_mtvscr((vector
int)
__a);
6179 __builtin_altivec_mtvscr((vector
int)
__a);
6183 __builtin_altivec_mtvscr((vector
int)
__a);
6224vec_mul(vector
signed long long __a, vector
signed long long __b) {
6228static __inline__ vector
unsigned long long __ATTRS_o_ai
6229vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
6241 vector
double __b) {
6252 vector
signed char __b) {
6253#ifdef __LITTLE_ENDIAN__
6254 return __builtin_altivec_vmulosb(
__a,
__b);
6256 return __builtin_altivec_vmulesb(
__a,
__b);
6262#ifdef __LITTLE_ENDIAN__
6263 return __builtin_altivec_vmuloub(
__a,
__b);
6265 return __builtin_altivec_vmuleub(
__a,
__b);
6271#ifdef __LITTLE_ENDIAN__
6272 return __builtin_altivec_vmulosh(
__a,
__b);
6274 return __builtin_altivec_vmulesh(
__a,
__b);
6280#ifdef __LITTLE_ENDIAN__
6281 return __builtin_altivec_vmulouh(
__a,
__b);
6283 return __builtin_altivec_vmuleuh(
__a,
__b);
6287#ifdef __POWER8_VECTOR__
6290#ifdef __LITTLE_ENDIAN__
6291 return __builtin_altivec_vmulosw(
__a,
__b);
6293 return __builtin_altivec_vmulesw(
__a,
__b);
6297static __inline__ vector
unsigned long long __ATTRS_o_ai
6299#ifdef __LITTLE_ENDIAN__
6300 return __builtin_altivec_vmulouw(
__a,
__b);
6302 return __builtin_altivec_vmuleuw(
__a,
__b);
6307#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6309vec_mule(vector
signed long long __a, vector
signed long long __b) {
6310#ifdef __LITTLE_ENDIAN__
6311 return __builtin_altivec_vmulosd(
__a,
__b);
6313 return __builtin_altivec_vmulesd(
__a,
__b);
6318vec_mule(vector
unsigned long long __a, vector
unsigned long long __b) {
6319#ifdef __LITTLE_ENDIAN__
6320 return __builtin_altivec_vmuloud(
__a,
__b);
6322 return __builtin_altivec_vmuleud(
__a,
__b);
6329static __inline__ vector
short __attribute__((__always_inline__))
6330vec_vmulesb(vector
signed char __a, vector
signed char __b) {
6331#ifdef __LITTLE_ENDIAN__
6332 return __builtin_altivec_vmulosb(
__a,
__b);
6334 return __builtin_altivec_vmulesb(
__a,
__b);
6340static __inline__ vector
unsigned short __attribute__((__always_inline__))
6341vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
6342#ifdef __LITTLE_ENDIAN__
6343 return __builtin_altivec_vmuloub(
__a,
__b);
6345 return __builtin_altivec_vmuleub(
__a,
__b);
6351static __inline__ vector
int __attribute__((__always_inline__))
6352vec_vmulesh(vector
short __a, vector
short __b) {
6353#ifdef __LITTLE_ENDIAN__
6354 return __builtin_altivec_vmulosh(
__a,
__b);
6356 return __builtin_altivec_vmulesh(
__a,
__b);
6362static __inline__ vector
unsigned int __attribute__((__always_inline__))
6363vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
6364#ifdef __LITTLE_ENDIAN__
6365 return __builtin_altivec_vmulouh(
__a,
__b);
6367 return __builtin_altivec_vmuleuh(
__a,
__b);
6373#ifdef __POWER10_VECTOR__
6375vec_mulh(vector
signed int __a, vector
signed int __b) {
6376 return __builtin_altivec_vmulhsw(
__a,
__b);
6380vec_mulh(vector
unsigned int __a, vector
unsigned int __b) {
6381 return __builtin_altivec_vmulhuw(
__a,
__b);
6385vec_mulh(vector
signed long long __a, vector
signed long long __b) {
6386 return __builtin_altivec_vmulhsd(
__a,
__b);
6389static __inline__ vector
unsigned long long __ATTRS_o_ai
6390vec_mulh(vector
unsigned long long __a, vector
unsigned long long __b) {
6391 return __builtin_altivec_vmulhud(
__a,
__b);
6398 vector
signed char __b) {
6399#ifdef __LITTLE_ENDIAN__
6400 return __builtin_altivec_vmulesb(
__a,
__b);
6402 return __builtin_altivec_vmulosb(
__a,
__b);
6408#ifdef __LITTLE_ENDIAN__
6409 return __builtin_altivec_vmuleub(
__a,
__b);
6411 return __builtin_altivec_vmuloub(
__a,
__b);
6417#ifdef __LITTLE_ENDIAN__
6418 return __builtin_altivec_vmulesh(
__a,
__b);
6420 return __builtin_altivec_vmulosh(
__a,
__b);
6426#ifdef __LITTLE_ENDIAN__
6427 return __builtin_altivec_vmuleuh(
__a,
__b);
6429 return __builtin_altivec_vmulouh(
__a,
__b);
6433#ifdef __POWER8_VECTOR__
6436#ifdef __LITTLE_ENDIAN__
6437 return __builtin_altivec_vmulesw(
__a,
__b);
6439 return __builtin_altivec_vmulosw(
__a,
__b);
6443static __inline__ vector
unsigned long long __ATTRS_o_ai
6445#ifdef __LITTLE_ENDIAN__
6446 return __builtin_altivec_vmuleuw(
__a,
__b);
6448 return __builtin_altivec_vmulouw(
__a,
__b);
6453#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6455vec_mulo(vector
signed long long __a, vector
signed long long __b) {
6456#ifdef __LITTLE_ENDIAN__
6457 return __builtin_altivec_vmulesd(
__a,
__b);
6459 return __builtin_altivec_vmulosd(
__a,
__b);
6464vec_mulo(vector
unsigned long long __a, vector
unsigned long long __b) {
6465#ifdef __LITTLE_ENDIAN__
6466 return __builtin_altivec_vmuleud(
__a,
__b);
6468 return __builtin_altivec_vmuloud(
__a,
__b);
6475static __inline__ vector
short __attribute__((__always_inline__))
6476vec_vmulosb(vector
signed char __a, vector
signed char __b) {
6477#ifdef __LITTLE_ENDIAN__
6478 return __builtin_altivec_vmulesb(
__a,
__b);
6480 return __builtin_altivec_vmulosb(
__a,
__b);
6486static __inline__ vector
unsigned short __attribute__((__always_inline__))
6487vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
6488#ifdef __LITTLE_ENDIAN__
6489 return __builtin_altivec_vmuleub(
__a,
__b);
6491 return __builtin_altivec_vmuloub(
__a,
__b);
6497static __inline__ vector
int __attribute__((__always_inline__))
6498vec_vmulosh(vector
short __a, vector
short __b) {
6499#ifdef __LITTLE_ENDIAN__
6500 return __builtin_altivec_vmulesh(
__a,
__b);
6502 return __builtin_altivec_vmulosh(
__a,
__b);
6508static __inline__ vector
unsigned int __attribute__((__always_inline__))
6509vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
6510#ifdef __LITTLE_ENDIAN__
6511 return __builtin_altivec_vmuleuh(
__a,
__b);
6513 return __builtin_altivec_vmulouh(
__a,
__b);
6519#ifdef __POWER8_VECTOR__
6521vec_nand(vector
signed char __a, vector
signed char __b) {
6526vec_nand(vector
signed char __a, vector
bool char __b) {
6527 return ~(
__a & (vector
signed char)
__b);
6531vec_nand(vector
bool char __a, vector
signed char __b) {
6532 return (vector
signed char)~(
__a & (vector
bool char)
__b);
6536vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
6541vec_nand(vector
unsigned char __a, vector
bool char __b) {
6542 return ~(
__a & (vector
unsigned char)
__b);
6546vec_nand(vector
bool char __a, vector
unsigned char __b) {
6547 return (vector
unsigned char)~(
__a & (vector
bool char)
__b);
6550static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
6551 vector
bool char __b) {
6556vec_nand(vector
signed short __a, vector
signed short __b) {
6561vec_nand(vector
signed short __a, vector
bool short __b) {
6562 return ~(
__a & (vector
signed short)
__b);
6566vec_nand(vector
bool short __a, vector
signed short __b) {
6567 return (vector
signed short)~(
__a & (vector
bool short)
__b);
6571vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
6576vec_nand(vector
unsigned short __a, vector
bool short __b) {
6577 return ~(
__a & (vector
unsigned short)
__b);
6581vec_nand(vector
bool short __a, vector
bool short __b) {
6586vec_nand(vector
signed int __a, vector
signed int __b) {
6590static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
6591 vector
bool int __b) {
6596vec_nand(vector
bool int __a, vector
signed int __b) {
6597 return (vector
signed int)~(
__a & (vector
bool int)
__b);
6601vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
6606vec_nand(vector
unsigned int __a, vector
bool int __b) {
6607 return ~(
__a & (vector
unsigned int)
__b);
6611vec_nand(vector
bool int __a, vector
unsigned int __b) {
6612 return (vector
unsigned int)~(
__a & (vector
bool int)
__b);
6615static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
6616 vector
bool int __b) {
6621vec_nand(vector
float __a, vector
float __b) {
6622 return (vector
float)(~((vector
unsigned int)
__a &
6623 (vector
unsigned int)
__b));
6627vec_nand(vector
signed long long __a, vector
signed long long __b) {
6632vec_nand(vector
signed long long __a, vector
bool long long __b) {
6633 return ~(
__a & (vector
signed long long)
__b);
6637vec_nand(vector
bool long long __a, vector
signed long long __b) {
6638 return (vector
signed long long)~(
__a & (vector
bool long long)
__b);
6641static __inline__ vector
unsigned long long __ATTRS_o_ai
6642vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
6646static __inline__ vector
unsigned long long __ATTRS_o_ai
6647vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
6648 return ~(
__a & (vector
unsigned long long)
__b);
6651static __inline__ vector
unsigned long long __ATTRS_o_ai
6652vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
6653 return (vector
unsigned long long)~(
__a & (vector
bool long long)
__b);
6657vec_nand(vector
bool long long __a, vector
bool long long __b) {
6662vec_nand(vector
double __a, vector
double __b) {
6663 return (vector
double)(~((vector
unsigned long long)
__a &
6664 (vector
unsigned long long)
__b));
6672static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6675 return __builtin_vsx_xvnmaddasp(
__a,
__b,
__c);
6678static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6680 vector
double __c) {
6681 return __builtin_vsx_xvnmaddadp(
__a,
__b,
__c);
6691 return __builtin_vsx_xvnmsubasp(
__a,
__b,
__c);
6693 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6700 vector
double __c) {
6701 return __builtin_vsx_xvnmsubadp(
__a,
__b,
__c);
6707static __inline__ vector
float __attribute__((__always_inline__))
6708vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6709 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6714#define __builtin_altivec_vnor vec_nor
6727 vector
bool char __b) {
6757 vector
bool int __b) {
6763 vector
unsigned int __res =
6764 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6765 return (vector
float)__res;
6770 vector
double __b) {
6771 vector
unsigned long long __res =
6772 ~((vector
unsigned long long)
__a | (vector
unsigned long long)
__b);
6773 return (vector
double)__res;
6790 vector
bool char __b) {
6820 vector
bool int __b) {
6826 vector
unsigned int __res =
6827 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6828 return (vector
float)__res;
6833vec_nor(vector
signed long long __a, vector
signed long long __b) {
6837static __inline__ vector
unsigned long long __ATTRS_o_ai
6838vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6843vec_nor(vector
bool long long __a, vector
bool long long __b) {
6850#define __builtin_altivec_vor vec_or
6859 return (vector
signed char)
__a |
__b;
6863 vector
bool char __b) {
6864 return __a | (vector
signed char)
__b;
6874 return (vector
unsigned char)
__a |
__b;
6879 return __a | (vector
unsigned char)
__b;
6883 vector
bool char __b) {
6894 return (vector
short)
__a |
__b;
6898 vector
bool short __b) {
6899 return __a | (vector short)
__b;
6909 return (vector
unsigned short)
__a |
__b;
6914 return __a | (vector
unsigned short)
__b;
6918 vector
bool short __b) {
6929 return (vector
int)
__a |
__b;
6933 vector
bool int __b) {
6944 return (vector
unsigned int)
__a |
__b;
6953 vector
bool int __b) {
6959 vector
unsigned int __res =
6960 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6961 return (vector
float)__res;
6966 vector
unsigned int __res =
6967 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6968 return (vector
float)__res;
6972 vector
bool int __b) {
6973 vector
unsigned int __res =
6974 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6975 return (vector
float)__res;
6980 vector
double __b) {
6981 return (vector
double)((vector
unsigned long long)
__a |
6982 (vector
unsigned long long)
__b);
6986 vector
bool long long __b) {
6987 return (vector
double)((vector
unsigned long long)
__a |
6988 (vector
unsigned long long)
__b);
6992 vector
double __b) {
6993 return (vector
double)((vector
unsigned long long)
__a |
6994 (vector
unsigned long long)
__b);
6998vec_or(vector
signed long long __a, vector
signed long long __b) {
7003vec_or(vector
bool long long __a, vector
signed long long __b) {
7004 return (vector
signed long long)
__a |
__b;
7008vec_or(vector
signed long long __a, vector
bool long long __b) {
7009 return __a | (vector
signed long long)
__b;
7012static __inline__ vector
unsigned long long __ATTRS_o_ai
7013vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
7017static __inline__ vector
unsigned long long __ATTRS_o_ai
7018vec_or(vector
bool long long __a, vector
unsigned long long __b) {
7019 return (vector
unsigned long long)
__a |
__b;
7022static __inline__ vector
unsigned long long __ATTRS_o_ai
7023vec_or(vector
unsigned long long __a, vector
bool long long __b) {
7024 return __a | (vector
unsigned long long)
__b;
7028vec_or(vector
bool long long __a, vector
bool long long __b) {
7033#ifdef __POWER8_VECTOR__
7035vec_orc(vector
signed char __a, vector
signed char __b) {
7040vec_orc(vector
signed char __a, vector
bool char __b) {
7041 return __a | (vector
signed char)~
__b;
7045vec_orc(vector
bool char __a, vector
signed char __b) {
7046 return (vector
signed char)(
__a | (vector
bool char)~__b);
7050vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
7055vec_orc(vector
unsigned char __a, vector
bool char __b) {
7056 return __a | (vector
unsigned char)~
__b;
7060vec_orc(vector
bool char __a, vector
unsigned char __b) {
7061 return (vector
unsigned char)(
__a | (vector
bool char)~__b);
7064static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
7065 vector
bool char __b) {
7070vec_orc(vector
signed short __a, vector
signed short __b) {
7075vec_orc(vector
signed short __a, vector
bool short __b) {
7076 return __a | (vector
signed short)~
__b;
7080vec_orc(vector
bool short __a, vector
signed short __b) {
7081 return (vector
signed short)(
__a | (vector
bool short)~__b);
7085vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
7090vec_orc(vector
unsigned short __a, vector
bool short __b) {
7091 return __a | (vector
unsigned short)~
__b;
7095vec_orc(vector
bool short __a, vector
unsigned short __b) {
7096 return (vector
unsigned short)(
__a | (vector
bool short)~__b);
7100vec_orc(vector
bool short __a, vector
bool short __b) {
7105vec_orc(vector
signed int __a, vector
signed int __b) {
7109static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
7110 vector
bool int __b) {
7115vec_orc(vector
bool int __a, vector
signed int __b) {
7116 return (vector
signed int)(
__a | (vector
bool int)~__b);
7120vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
7125vec_orc(vector
unsigned int __a, vector
bool int __b) {
7130vec_orc(vector
bool int __a, vector
unsigned int __b) {
7131 return (vector
unsigned int)(
__a | (vector
bool int)~__b);
7134static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
7135 vector
bool int __b) {
7140vec_orc(vector
bool int __a, vector
float __b) {
7141 return (vector
float)(
__a | ~(vector
bool int)
__b);
7145vec_orc(vector
float __a, vector
bool int __b) {
7146 return (vector
float)((vector
bool int)
__a | ~__b);
7151 return (vector
float)((vector
unsigned int)
__a | ~(vector
unsigned int)
__b);
7155vec_orc(vector
signed long long __a, vector
signed long long __b) {
7160vec_orc(vector
signed long long __a, vector
bool long long __b) {
7161 return __a | (vector
signed long long)~
__b;
7165vec_orc(vector
bool long long __a, vector
signed long long __b) {
7166 return (vector
signed long long)(
__a | (vector
bool long long)~__b);
7169static __inline__ vector
unsigned long long __ATTRS_o_ai
7170vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
7174static __inline__ vector
unsigned long long __ATTRS_o_ai
7175vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
7176 return __a | (vector
unsigned long long)~
__b;
7179static __inline__ vector
unsigned long long __ATTRS_o_ai
7180vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
7181 return (vector
unsigned long long)(
__a | (vector
bool long long)~__b);
7185vec_orc(vector
bool long long __a, vector
bool long long __b) {
7190vec_orc(vector
double __a, vector
bool long long __b) {
7191 return (vector
double)((vector
bool long long)
__a | ~__b);
7195vec_orc(vector
bool long long __a, vector
double __b) {
7196 return (vector
double)(
__a | ~(vector
bool long long)
__b);
7199static __inline__ vector
double __ATTRS_o_ai vec_orc(vector
double __a,
7200 vector
double __b) {
7201 return (vector
double)((vector
unsigned long long)
__a |
7202 ~(vector
unsigned long long)
__b);
7215 return (vector
signed char)
__a |
__b;
7220 return __a | (vector
signed char)
__b;
7230 return (vector
unsigned char)
__a |
__b;
7235 return __a | (vector
unsigned char)
__b;
7239 vector
bool char __b) {
7250 return (vector
short)
__a |
__b;
7254 vector
bool short __b) {
7255 return __a | (vector short)
__b;
7265 return (vector
unsigned short)
__a |
__b;
7270 return __a | (vector
unsigned short)
__b;
7285 return (vector
int)
__a |
__b;
7289 vector
bool int __b) {
7300 return (vector
unsigned int)
__a |
__b;
7309 vector
bool int __b) {
7315 vector
unsigned int __res =
7316 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7317 return (vector
float)__res;
7322 vector
unsigned int __res =
7323 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7324 return (vector
float)__res;
7328 vector
bool int __b) {
7329 vector
unsigned int __res =
7330 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7331 return (vector
float)__res;
7336vec_vor(vector
signed long long __a, vector
signed long long __b) {
7341vec_vor(vector
bool long long __a, vector
signed long long __b) {
7342 return (vector
signed long long)
__a |
__b;
7346vec_vor(vector
signed long long __a, vector
bool long long __b) {
7347 return __a | (vector
signed long long)
__b;
7350static __inline__ vector
unsigned long long __ATTRS_o_ai
7351vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
7355static __inline__ vector
unsigned long long __ATTRS_o_ai
7356vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
7357 return (vector
unsigned long long)
__a |
__b;
7360static __inline__ vector
unsigned long long __ATTRS_o_ai
7361vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
7362 return __a | (vector
unsigned long long)
__b;
7366vec_vor(vector
bool long long __a, vector
bool long long __b) {
7378#ifdef __LITTLE_ENDIAN__
7379 return (vector
signed char)
vec_perm(
7381 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7382 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7384 return (vector
signed char)
vec_perm(
7386 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7387 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7393#ifdef __LITTLE_ENDIAN__
7394 return (vector
unsigned char)
vec_perm(
7396 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7397 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7399 return (vector
unsigned char)
vec_perm(
7401 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7402 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7408#ifdef __LITTLE_ENDIAN__
7411 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7412 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7416 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7417 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7423#ifdef __LITTLE_ENDIAN__
7426 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7427 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7431 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7432 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7438#ifdef __LITTLE_ENDIAN__
7439 return (vector
unsigned short)
vec_perm(
7441 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7442 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7444 return (vector
unsigned short)
vec_perm(
7446 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7447 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7452 vector
bool int __b) {
7453#ifdef __LITTLE_ENDIAN__
7454 return (vector
bool short)
vec_perm(
7456 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7457 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7459 return (vector
bool short)
vec_perm(
7461 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7462 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7468vec_pack(vector
signed long long __a, vector
signed long long __b) {
7469#ifdef __LITTLE_ENDIAN__
7470 return (vector
signed int)
vec_perm(
7472 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7473 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7475 return (vector
signed int)
vec_perm(
7477 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7478 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7482vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
7483#ifdef __LITTLE_ENDIAN__
7484 return (vector
unsigned int)
vec_perm(
7486 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7487 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7489 return (vector
unsigned int)
vec_perm(
7491 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7492 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7498#ifdef __LITTLE_ENDIAN__
7501 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7502 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7506 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7507 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7513 return (vector
float) (
__a[0],
__a[1],
__b[0],
__b[1]);
7517#ifdef __POWER9_VECTOR__
7519vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
7520 vector
float __resa = __builtin_vsx_xvcvsphp(
__a);
7521 vector
float __resb = __builtin_vsx_xvcvsphp(
__b);
7522#ifdef __LITTLE_ENDIAN__
7523 return (vector
unsigned short)vec_mergee(__resa, __resb);
7525 return (vector
unsigned short)vec_mergeo(__resa, __resb);
7532#define __builtin_altivec_vpkuhum vec_vpkuhum
7536#ifdef __LITTLE_ENDIAN__
7537 return (vector
signed char)
vec_perm(
7539 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7540 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7542 return (vector
signed char)
vec_perm(
7544 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7545 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7551#ifdef __LITTLE_ENDIAN__
7552 return (vector
unsigned char)
vec_perm(
7554 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7555 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7557 return (vector
unsigned char)
vec_perm(
7559 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7560 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7566#ifdef __LITTLE_ENDIAN__
7569 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7570 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7574 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7575 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7581#define __builtin_altivec_vpkuwum vec_vpkuwum
7585#ifdef __LITTLE_ENDIAN__
7588 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7589 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7593 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7594 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7600#ifdef __LITTLE_ENDIAN__
7601 return (vector
unsigned short)
vec_perm(
7603 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7604 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7606 return (vector
unsigned short)
vec_perm(
7608 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7609 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7615#ifdef __LITTLE_ENDIAN__
7616 return (vector
bool short)
vec_perm(
7618 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7619 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7621 return (vector
bool short)
vec_perm(
7623 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7624 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7630#ifdef __POWER8_VECTOR__
7631#define __builtin_altivec_vpkudum vec_vpkudum
7633static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
7634 vector
long long __b) {
7635#ifdef __LITTLE_ENDIAN__
7638 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7639 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7643 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7644 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7649vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
7650#ifdef __LITTLE_ENDIAN__
7651 return (vector
unsigned int)
vec_perm(
7653 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7654 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7656 return (vector
unsigned int)
vec_perm(
7658 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7659 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7664vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
7665#ifdef __LITTLE_ENDIAN__
7667 (vector
long long)
__a, (vector
long long)
__b,
7668 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7669 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7672 (vector
long long)
__a, (vector
long long)
__b,
7673 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7674 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7681static __inline__ vector pixel
__attribute__((__always_inline__))
7682vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
7683#ifdef __LITTLE_ENDIAN__
7684 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7686 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7692static __inline__ vector pixel
__attribute__((__always_inline__))
7693vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7694#ifdef __LITTLE_ENDIAN__
7695 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7697 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7705#ifdef __LITTLE_ENDIAN__
7706 return __builtin_altivec_vpkshss(
__b,
__a);
7708 return __builtin_altivec_vpkshss(
__a,
__b);
7714#ifdef __LITTLE_ENDIAN__
7715 return __builtin_altivec_vpkuhus(
__b,
__a);
7717 return __builtin_altivec_vpkuhus(
__a,
__b);
7723#ifdef __LITTLE_ENDIAN__
7724 return __builtin_altivec_vpkswss(
__b,
__a);
7726 return __builtin_altivec_vpkswss(
__a,
__b);
7732#ifdef __LITTLE_ENDIAN__
7733 return __builtin_altivec_vpkuwus(
__b,
__a);
7735 return __builtin_altivec_vpkuwus(
__a,
__b);
7739#ifdef __POWER8_VECTOR__
7741 vector
long long __b) {
7742#ifdef __LITTLE_ENDIAN__
7743 return __builtin_altivec_vpksdss(
__b,
__a);
7745 return __builtin_altivec_vpksdss(
__a,
__b);
7750vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7751#ifdef __LITTLE_ENDIAN__
7752 return __builtin_altivec_vpkudus(
__b,
__a);
7754 return __builtin_altivec_vpkudus(
__a,
__b);
7761static __inline__ vector
signed char __attribute__((__always_inline__))
7762vec_vpkshss(vector
short __a, vector
short __b) {
7763#ifdef __LITTLE_ENDIAN__
7764 return __builtin_altivec_vpkshss(
__b,
__a);
7766 return __builtin_altivec_vpkshss(
__a,
__b);
7772#ifdef __POWER8_VECTOR__
7773static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7774 vector
long long __b) {
7775#ifdef __LITTLE_ENDIAN__
7776 return __builtin_altivec_vpksdss(
__b,
__a);
7778 return __builtin_altivec_vpksdss(
__a,
__b);
7785static __inline__ vector
unsigned char __attribute__((__always_inline__))
7786vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7787#ifdef __LITTLE_ENDIAN__
7788 return __builtin_altivec_vpkuhus(
__b,
__a);
7790 return __builtin_altivec_vpkuhus(
__a,
__b);
7796#ifdef __POWER8_VECTOR__
7797static __inline__ vector
unsigned int __attribute__((__always_inline__))
7798vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7799#ifdef __LITTLE_ENDIAN__
7800 return __builtin_altivec_vpkudus(
__b,
__a);
7802 return __builtin_altivec_vpkudus(
__a,
__b);
7809static __inline__ vector
signed short __attribute__((__always_inline__))
7810vec_vpkswss(vector
int __a, vector
int __b) {
7811#ifdef __LITTLE_ENDIAN__
7812 return __builtin_altivec_vpkswss(
__b,
__a);
7814 return __builtin_altivec_vpkswss(
__a,
__b);
7820static __inline__ vector
unsigned short __attribute__((__always_inline__))
7821vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7822#ifdef __LITTLE_ENDIAN__
7823 return __builtin_altivec_vpkuwus(
__b,
__a);
7825 return __builtin_altivec_vpkuwus(
__a,
__b);
7833#ifdef __LITTLE_ENDIAN__
7834 return __builtin_altivec_vpkshus(
__b,
__a);
7836 return __builtin_altivec_vpkshus(
__a,
__b);
7842#ifdef __LITTLE_ENDIAN__
7843 return __builtin_altivec_vpkuhus(
__b,
__a);
7845 return __builtin_altivec_vpkuhus(
__a,
__b);
7851#ifdef __LITTLE_ENDIAN__
7852 return __builtin_altivec_vpkswus(
__b,
__a);
7854 return __builtin_altivec_vpkswus(
__a,
__b);
7860#ifdef __LITTLE_ENDIAN__
7861 return __builtin_altivec_vpkuwus(
__b,
__a);
7863 return __builtin_altivec_vpkuwus(
__a,
__b);
7867#ifdef __POWER8_VECTOR__
7870#ifdef __LITTLE_ENDIAN__
7871 return __builtin_altivec_vpksdus(
__b,
__a);
7873 return __builtin_altivec_vpksdus(
__a,
__b);
7879#ifdef __LITTLE_ENDIAN__
7880 return __builtin_altivec_vpkudus(
__b,
__a);
7882 return __builtin_altivec_vpkudus(
__a,
__b);
7891#ifdef __LITTLE_ENDIAN__
7892 return __builtin_altivec_vpkshus(
__b,
__a);
7894 return __builtin_altivec_vpkshus(
__a,
__b);
7900#ifdef __LITTLE_ENDIAN__
7901 return __builtin_altivec_vpkuhus(
__b,
__a);
7903 return __builtin_altivec_vpkuhus(
__a,
__b);
7911#ifdef __LITTLE_ENDIAN__
7912 return __builtin_altivec_vpkswus(
__b,
__a);
7914 return __builtin_altivec_vpkswus(
__a,
__b);
7920#ifdef __LITTLE_ENDIAN__
7921 return __builtin_altivec_vpkuwus(
__b,
__a);
7923 return __builtin_altivec_vpkuwus(
__a,
__b);
7929#ifdef __POWER8_VECTOR__
7931vec_vpksdus(vector
long long __a, vector
long long __b) {
7932#ifdef __LITTLE_ENDIAN__
7933 return __builtin_altivec_vpksdus(
__b,
__a);
7935 return __builtin_altivec_vpksdus(
__a,
__b);
7951 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7952#ifdef __LITTLE_ENDIAN__
7953 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7954 255, 255, 255, 255, 255, 255, 255, 255};
7956 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__b,
7957 (vector
int)
__a, __d);
7959 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__a,
7966 vector
unsigned char __c) {
7967#ifdef __LITTLE_ENDIAN__
7968 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7969 255, 255, 255, 255, 255, 255, 255, 255};
7971 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7972 (vector
int)
__b, (vector
int)
__a, __d);
7974 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7981#ifdef __LITTLE_ENDIAN__
7982 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7983 255, 255, 255, 255, 255, 255, 255, 255};
7985 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__b,
7986 (vector
int)
__a, __d);
7988 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__a,
7994 vector
signed short __b,
7995 vector
unsigned char __c) {
7996#ifdef __LITTLE_ENDIAN__
7997 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7998 255, 255, 255, 255, 255, 255, 255, 255};
8000 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__b,
8001 (vector
int)
__a, __d);
8003 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__a,
8010 vector
unsigned char __c) {
8011#ifdef __LITTLE_ENDIAN__
8012 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8013 255, 255, 255, 255, 255, 255, 255, 255};
8015 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8016 (vector
int)
__b, (vector
int)
__a, __d);
8018 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8024 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8025#ifdef __LITTLE_ENDIAN__
8026 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8027 255, 255, 255, 255, 255, 255, 255, 255};
8029 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__b,
8030 (vector
int)
__a, __d);
8032 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__a,
8039 vector
unsigned char __c) {
8040#ifdef __LITTLE_ENDIAN__
8041 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8042 255, 255, 255, 255, 255, 255, 255, 255};
8044 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__b,
8045 (vector
int)
__a, __d);
8047 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__a,
8053 vector
signed int __b,
8054 vector
unsigned char __c) {
8055#ifdef __LITTLE_ENDIAN__
8056 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8057 255, 255, 255, 255, 255, 255, 255, 255};
8059 return (vector
signed int)__builtin_altivec_vperm_4si(
__b,
__a, __d);
8061 return (vector
signed int)__builtin_altivec_vperm_4si(
__a,
__b,
__c);
8067 vector
unsigned char __c) {
8068#ifdef __LITTLE_ENDIAN__
8069 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8070 255, 255, 255, 255, 255, 255, 255, 255};
8072 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__b,
8073 (vector
int)
__a, __d);
8075 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__a,
8082#ifdef __LITTLE_ENDIAN__
8083 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8084 255, 255, 255, 255, 255, 255, 255, 255};
8086 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__b,
8087 (vector
int)
__a, __d);
8089 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__a,
8096 vector
unsigned char __c) {
8097#ifdef __LITTLE_ENDIAN__
8098 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8099 255, 255, 255, 255, 255, 255, 255, 255};
8101 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__b,
8102 (vector
int)
__a, __d);
8104 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__a,
8111vec_perm(vector
signed long long __a, vector
signed long long __b,
8112 vector
unsigned char __c) {
8113#ifdef __LITTLE_ENDIAN__
8114 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8115 255, 255, 255, 255, 255, 255, 255, 255};
8117 return (vector
signed long long)__builtin_altivec_vperm_4si(
8118 (vector
int)
__b, (vector
int)
__a, __d);
8120 return (vector
signed long long)__builtin_altivec_vperm_4si(
8125static __inline__ vector
unsigned long long __ATTRS_o_ai
8126vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
8127 vector
unsigned char __c) {
8128#ifdef __LITTLE_ENDIAN__
8129 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8130 255, 255, 255, 255, 255, 255, 255, 255};
8132 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8133 (vector
int)
__b, (vector
int)
__a, __d);
8135 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8142 vector
unsigned char __c) {
8143#ifdef __LITTLE_ENDIAN__
8144 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8145 255, 255, 255, 255, 255, 255, 255, 255};
8147 return (vector
bool long long)__builtin_altivec_vperm_4si(
8148 (vector
int)
__b, (vector
int)
__a, __d);
8150 return (vector
bool long long)__builtin_altivec_vperm_4si(
8157#ifdef __LITTLE_ENDIAN__
8158 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8159 255, 255, 255, 255, 255, 255, 255, 255};
8161 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__b,
8162 (vector
int)
__a, __d);
8164 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__a,
8173 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8179 vector
unsigned char __c) {
8184 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
8195 vector
unsigned char __c) {
8200 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8211 vector
unsigned char __c) {
8217 vector
unsigned char __c) {
8233 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
8237static __inline__ vector
unsigned long long __ATTRS_o_ai
8238vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
8239 vector
unsigned char __c) {
8253 return __builtin_vsx_xvresp(
__a);
8255 return __builtin_altivec_vrefp(
__a);
8261 return __builtin_vsx_xvredp(
__a);
8267static __inline__ vector
float __attribute__((__always_inline__))
8268vec_vrefp(vector
float __a) {
8269 return __builtin_altivec_vrefp(
__a);
8276 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8281 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8285 vector
unsigned short __b) {
8286 return __builtin_altivec_vrlh(
__a,
__b);
8291 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8295 vector
unsigned int __b) {
8296 return __builtin_altivec_vrlw(
__a,
__b);
8301 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8304#ifdef __POWER8_VECTOR__
8306vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
8307 return __builtin_altivec_vrld(
__a,
__b);
8310static __inline__ vector
unsigned long long __ATTRS_o_ai
8311vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
8312 return (vector
unsigned long long)__builtin_altivec_vrld(
8313 (vector
long long)
__a,
__b);
8317#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8319vec_rl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
8320 return (vector
signed __int128)(((vector
unsigned __int128)
__b
8321 << (vector
unsigned __int128)
__a) |
8322 ((vector
unsigned __int128)
__b >>
8324 sizeof(vector
unsigned __int128)) -
8325 (vector
unsigned __int128)
__a)));
8329vec_rl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
8330 return (
__b <<
__a)|(
__b >> ((__CHAR_BIT__ *
sizeof(vector
unsigned __int128)) -
__a));
8335#ifdef __POWER9_VECTOR__
8337vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
8338 vector
unsigned int __c) {
8339 return __builtin_altivec_vrlwmi(
__a,
__c,
__b);
8342static __inline__ vector
unsigned long long __ATTRS_o_ai
8343vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
8344 vector
unsigned long long __c) {
8345 return __builtin_altivec_vrldmi(
__a,
__c,
__b);
8349#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8351vec_rlmi(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8352 vector
unsigned __int128
__c) {
8353 return __builtin_altivec_vrlqmi(
__a,
__c,
__b);
8357vec_rlmi(vector
signed __int128
__a, vector
signed __int128
__b,
8358 vector
signed __int128
__c) {
8359 return (vector
signed __int128)__builtin_altivec_vrlqmi(
8360 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__c,
8361 (vector
unsigned __int128)
__b);
8366#ifdef __POWER9_VECTOR__
8368vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
8369 vector
unsigned int __c) {
8370 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
8371 return __builtin_altivec_vrlwnm(
__a, ((
__c << OneByte) |
__b));
8374static __inline__ vector
unsigned long long __ATTRS_o_ai
8375vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
8376 vector
unsigned long long __c) {
8377 vector
unsigned long long OneByte = { 0x8, 0x8 };
8378 return __builtin_altivec_vrldnm(
__a, ((
__c << OneByte) |
__b));
8382#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8384vec_rlnm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8385 vector
unsigned __int128
__c) {
8387 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8388 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8389 vector
unsigned char MaskAndShift =
8390#ifdef __LITTLE_ENDIAN__
8391 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8392 1, -1, -1, -1, -1, -1);
8394 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8395 -1, -1, -1, -1, -1, -1, -1);
8397 return __builtin_altivec_vrlqnm(
__a, (vector
unsigned __int128) MaskAndShift);
8401vec_rlnm(vector
signed __int128
__a, vector
signed __int128
__b,
8402 vector
signed __int128
__c) {
8404 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8405 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8406 vector
unsigned char MaskAndShift =
8407#ifdef __LITTLE_ENDIAN__
8408 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8409 1, -1, -1, -1, -1, -1);
8411 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8412 -1, -1, -1, -1, -1, -1, -1);
8414 return (vector
signed __int128)__builtin_altivec_vrlqnm(
8415 (vector
unsigned __int128)
__a, (vector
unsigned __int128)MaskAndShift);
8423 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8428 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8435 return __builtin_altivec_vrlh(
__a,
__b);
8440 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8446 vector
unsigned int __b) {
8447 return __builtin_altivec_vrlw(
__a,
__b);
8452 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8458 return __builtin_altivec_vrfin(
__a);
8462#ifdef __XL_COMPAT_ALTIVEC__
8463static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a);
8465 double __fpscr = __builtin_readflm();
8466 __builtin_setrnd(0);
8467 vector
double __rounded = vec_rint(
__a);
8468 __builtin_setflm(__fpscr);
8473 return __builtin_vsx_xvrdpi(
__a);
8479static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
8480 return __builtin_vsx_xvrspic(
__a);
8483static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
8484 return __builtin_vsx_xvrdpic(
__a);
8489static __inline__ vector
float __ATTRS_o_ai vec_roundc(vector
float __a) {
8490 return __builtin_vsx_xvrspic(
__a);
8493static __inline__ vector
double __ATTRS_o_ai vec_roundc(vector
double __a) {
8494 return __builtin_vsx_xvrdpic(
__a);
8499static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
8500 return __builtin_vsx_xvrspi(
__a);
8503static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
8504 return __builtin_vsx_xvrdpi(
__a);
8510static __inline__ vector
float __attribute__((__always_inline__))
8511vec_vrfin(vector
float __a) {
8512 return __builtin_altivec_vrfin(
__a);
8518static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
8519 return __builtin_vsx_xvsqrtsp(
__a);
8522static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
8523 return __builtin_vsx_xvsqrtdp(
__a);
8531 return __builtin_vsx_xvrsqrtesp(
__a);
8533 return __builtin_altivec_vrsqrtefp(
__a);
8539 return __builtin_vsx_xvrsqrtedp(
__a);
8544 return __builtin_ppc_rsqrtf(
__a);
8549 return __builtin_ppc_rsqrtd(
__a);
8555static __inline__ __vector
float __attribute__((__always_inline__))
8556vec_vrsqrtefp(vector
float __a) {
8557 return __builtin_altivec_vrsqrtefp(
__a);
8563static __inline__
int __ATTRS_o_ai vec_test_swsqrt(vector
double __a) {
8564 return __builtin_vsx_xvtsqrtdp(
__a);
8567static __inline__
int __ATTRS_o_ai vec_test_swsqrts(vector
float __a) {
8568 return __builtin_vsx_xvtsqrtsp(
__a);
8574#define __builtin_altivec_vsel_4si vec_sel
8577 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8578 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8583 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8588 vector
unsigned char __c) {
8593 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8594 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8599 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8603 vector
bool char __b,
8604 vector
bool char __c) {
8610 vector
unsigned short __c) {
8611 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8616 vector
bool short __c) {
8617 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8622 vector
unsigned short __c) {
8628 vector
bool short __c) {
8629 return (
__a & ~(vector
unsigned short)
__c) |
8630 (
__b & (vector
unsigned short)
__c);
8634 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8635 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8645 vector
unsigned int __c) {
8651 vector
bool int __c) {
8656 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8662 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8671 vector
bool int __b,
8672 vector
bool int __c) {
8678 vector
unsigned int __c) {
8679 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8680 ((vector
int)
__b & (vector
int)
__c);
8681 return (vector
float)__res;
8686 vector
bool int __c) {
8687 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8688 ((vector
int)
__b & (vector
int)
__c);
8689 return (vector
float)__res;
8695 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8696 ((vector
long long)
__b & (vector
long long)
__c);
8697 return (vector
double)__res;
8701vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
8702 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8703 ((vector
long long)
__b & (vector
long long)
__c);
8704 return (vector
double)__res;
8708vec_sel(vector
bool long long __a, vector
bool long long __b,
8709 vector
bool long long __c) {
8714vec_sel(vector
bool long long __a, vector
bool long long __b,
8715 vector
unsigned long long __c) {
8716 return (
__a & ~(vector
bool long long)
__c) |
8717 (
__b & (vector
bool long long)
__c);
8721vec_sel(vector
signed long long __a, vector
signed long long __b,
8722 vector
bool long long __c) {
8723 return (
__a & ~(vector
signed long long)
__c) |
8724 (
__b & (vector
signed long long)
__c);
8728vec_sel(vector
signed long long __a, vector
signed long long __b,
8729 vector
unsigned long long __c) {
8730 return (
__a & ~(vector
signed long long)
__c) |
8731 (
__b & (vector
signed long long)
__c);
8734static __inline__ vector
unsigned long long __ATTRS_o_ai
8735vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8736 vector
bool long long __c) {
8737 return (
__a & ~(vector
unsigned long long)
__c) |
8738 (
__b & (vector
unsigned long long)
__c);
8741static __inline__ vector
unsigned long long __ATTRS_o_ai
8742vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8743 vector
unsigned long long __c) {
8751 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8752 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8757 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8762 vector
unsigned char __c) {
8767 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8768 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8773 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8777 vector
bool char __b,
8778 vector
bool char __c) {
8784 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8789 vector
bool short __c) {
8790 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8795 vector
unsigned short __c) {
8801 vector
bool short __c) {
8802 return (
__a & ~(vector
unsigned short)
__c) |
8803 (
__b & (vector
unsigned short)
__c);
8807 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8808 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8818 vector
unsigned int __c) {
8824 vector
bool int __c) {
8829 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8834 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
8835 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8844 vector
bool int __b,
8845 vector
bool int __c) {
8851 vector
unsigned int __c) {
8852 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8853 ((vector
int)
__b & (vector
int)
__c);
8854 return (vector
float)__res;
8859 vector
bool int __c) {
8860 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8861 ((vector
int)
__b & (vector
int)
__c);
8862 return (vector
float)__res;
8872 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8877 return (vector
signed char)
vec_sl((vector
unsigned char)
__a,
__b);
8882 return __a << (
__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8887 vector
unsigned short __b) {
8888 return (vector
short)
vec_sl((vector
unsigned short)
__a,
__b);
8894 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8898 vector
unsigned int __b) {
8899 return (vector
int)
vec_sl((vector
unsigned int)
__a,
__b);
8902#ifdef __POWER8_VECTOR__
8903static __inline__ vector
unsigned long long __ATTRS_o_ai
8904vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8905 return __a << (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8910vec_sl(vector
long long __a, vector
unsigned long long __b) {
8911 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8913#elif defined(__VSX__)
8916static __inline__ vector
unsigned long long __ATTRS_o_ai
8917vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8918 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
8923 vector
signed long long __rightelt =
8924 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8925 (vector
signed int)
__b);
8926#ifdef __LITTLE_ENDIAN__
8927 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8928 (vector
signed int)__rightelt,
8929 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8931 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8932 (vector
signed int)__rightelt,
8933 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8935 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
8936 __b = __builtin_shufflevector(
__b,
__b, 1, 0);
8937 vector
signed long long __leftelt =
8938 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8939 (vector
signed int)
__b);
8940#ifdef __LITTLE_ENDIAN__
8941 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8942 (vector
signed int)__leftelt,
8943 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8944 return (vector
unsigned long long)__builtin_shufflevector(__rightelt,
8947 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8948 (vector
signed int)__leftelt,
8949 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8950 return (vector
unsigned long long)__builtin_shufflevector(__leftelt,
8956vec_sl(vector
long long __a, vector
unsigned long long __b) {
8957 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8963#define __builtin_altivec_vslb vec_vslb
8977#define __builtin_altivec_vslh vec_vslh
8991#define __builtin_altivec_vslw vec_vslw
8994 vector
unsigned int __b) {
9005#define __builtin_altivec_vsldoi_4si vec_sld
9008 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9009 unsigned char __d =
__c & 0x0F;
9010#ifdef __LITTLE_ENDIAN__
9012 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9013 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9014 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9015 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9019 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9020 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9021 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9027 unsigned const int __c) {
9028 unsigned char __d =
__c & 0x0F;
9029#ifdef __LITTLE_ENDIAN__
9031 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9032 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9033 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9034 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9038 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9039 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9040 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9046 unsigned char __d =
__c & 0x0F;
9047#ifdef __LITTLE_ENDIAN__
9049 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9050 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9051 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9052 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9056 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9057 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9058 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9063 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9064 unsigned char __d =
__c & 0x0F;
9065#ifdef __LITTLE_ENDIAN__
9067 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9068 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9069 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9070 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9074 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9075 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9076 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9082 unsigned const int __c) {
9083 unsigned char __d =
__c & 0x0F;
9084#ifdef __LITTLE_ENDIAN__
9086 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9087 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9088 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9089 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9093 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9094 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9095 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9101 unsigned char __d =
__c & 0x0F;
9102#ifdef __LITTLE_ENDIAN__
9104 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9105 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9106 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9107 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9111 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9112 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9113 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9119 unsigned const int __c) {
9120 unsigned char __d =
__c & 0x0F;
9121#ifdef __LITTLE_ENDIAN__
9123 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9124 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9125 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9126 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9130 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9131 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9132 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9138 unsigned char __d =
__c & 0x0F;
9139#ifdef __LITTLE_ENDIAN__
9141 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9142 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9143 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9144 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9148 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9149 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9150 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9155 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9156 unsigned char __d =
__c & 0x0F;
9157#ifdef __LITTLE_ENDIAN__
9159 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9160 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9161 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9162 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9166 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9167 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9168 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9173 vector
bool int __b,
9174 unsigned const int __c) {
9175 unsigned char __d =
__c & 0x0F;
9176#ifdef __LITTLE_ENDIAN__
9178 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9179 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9180 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9181 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9185 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9186 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9187 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9193 unsigned const int __c) {
9194 unsigned char __d =
__c & 0x0F;
9195#ifdef __LITTLE_ENDIAN__
9197 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9198 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9199 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9200 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9204 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9205 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9206 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9212vec_sld(vector
bool long long __a, vector
bool long long __b,
9213 unsigned const int __c) {
9214 unsigned char __d =
__c & 0x0F;
9215#ifdef __LITTLE_ENDIAN__
9217 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9218 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9219 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9220 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9224 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9225 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9226 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9231vec_sld(vector
signed long long __a, vector
signed long long __b,
9232 unsigned const int __c) {
9233 unsigned char __d =
__c & 0x0F;
9234#ifdef __LITTLE_ENDIAN__
9236 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9237 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9238 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9239 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9243 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9244 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9245 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9249static __inline__ vector
unsigned long long __ATTRS_o_ai
9250vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
9251 unsigned const int __c) {
9252 unsigned char __d =
__c & 0x0F;
9253#ifdef __LITTLE_ENDIAN__
9255 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9256 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9257 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9258 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9262 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9263 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9264 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9270 unsigned const int __c) {
9271 unsigned char __d =
__c & 0x0F;
9272#ifdef __LITTLE_ENDIAN__
9274 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9275 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9276 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9277 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9281 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9282 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9283 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9290 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9296 unsigned const int __c) {
9301 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9307 unsigned const int __c) {
9317 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9322 vector
float __a, vector
float __b,
unsigned const int __c) {
9328vec_sldw(vector
signed long long __a, vector
signed long long __b,
9329 unsigned const int __c) {
9333static __inline__ vector
unsigned long long __ATTRS_o_ai
9334vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
9335 unsigned const int __c) {
9340 vector
double __a, vector
double __b,
unsigned const int __c) {
9345#ifdef __POWER9_VECTOR__
9348vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
9349 return __builtin_altivec_vslv(
__a,
__b);
9354vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
9355 return __builtin_altivec_vsrv(
__a,
__b);
9363 unsigned char __d =
__c & 0x0F;
9364#ifdef __LITTLE_ENDIAN__
9366 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9367 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9368 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9369 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9373 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9374 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9375 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9380 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
9381 unsigned char __d =
__c & 0x0F;
9382#ifdef __LITTLE_ENDIAN__
9384 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9385 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9386 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9387 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9391 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9392 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9393 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9399 unsigned char __c) {
9400 unsigned char __d =
__c & 0x0F;
9401#ifdef __LITTLE_ENDIAN__
9403 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9404 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9405 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9406 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9410 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9411 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9412 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9417 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
9418 unsigned char __d =
__c & 0x0F;
9419#ifdef __LITTLE_ENDIAN__
9421 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9422 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9423 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9424 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9428 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9429 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9430 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9436 unsigned char __c) {
9437 unsigned char __d =
__c & 0x0F;
9438#ifdef __LITTLE_ENDIAN__
9440 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9441 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9442 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9443 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9447 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9448 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9449 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9455 unsigned char __c) {
9456 unsigned char __d =
__c & 0x0F;
9457#ifdef __LITTLE_ENDIAN__
9459 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9460 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9461 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9462 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9466 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9467 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9468 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9473 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
9474 unsigned char __d =
__c & 0x0F;
9475#ifdef __LITTLE_ENDIAN__
9477 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9478 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9479 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9480 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9484 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9485 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9486 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9492 unsigned char __c) {
9493 unsigned char __d =
__c & 0x0F;
9494#ifdef __LITTLE_ENDIAN__
9496 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9497 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9498 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9499 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9503 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9504 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9505 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9513 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9519 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9525 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9531 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9537 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9543 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9549 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9555 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9561 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9566 vector
unsigned char __b) {
9567 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9571 vector
unsigned short __b) {
9572 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9576 vector
unsigned int __b) {
9577 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9582 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9588 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9594 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9600 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9606 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9612 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9617 vector
unsigned char __b) {
9618 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9622 vector
unsigned short __b) {
9623 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9627 vector
unsigned int __b) {
9628 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9632 vector
unsigned char __b) {
9633 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9637 vector
unsigned short __b) {
9638 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9642 vector
unsigned int __b) {
9643 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9648 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9654 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9660 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9666 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9672 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9678 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9684vec_sll(vector
signed long long __a, vector
unsigned char __b) {
9685 return (vector
signed long long)__builtin_altivec_vsl((vector
int)
__a,
9689static __inline__ vector
unsigned long long __ATTRS_o_ai
9690vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
9691 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)
__a,
9700 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9706 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9712 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9718 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9724 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9730 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9736 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9742 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9748 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9753 vector
unsigned char __b) {
9754 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9758 vector
unsigned short __b) {
9759 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9763 vector
unsigned int __b) {
9764 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9769 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9775 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9781 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9787 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9793 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9799 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9804 vector
unsigned char __b) {
9805 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9809 vector
unsigned short __b) {
9810 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9814 vector
unsigned int __b) {
9815 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9819 vector
unsigned char __b) {
9820 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9824 vector
unsigned short __b) {
9825 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9829 vector
unsigned int __b) {
9830 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9835 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9841 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9847 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9853 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9859 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9865 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9873 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9879 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9885 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9891 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9896 vector
signed char __b) {
9897 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9901 vector
unsigned char __b) {
9902 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9907 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9913 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9918 vector
signed char __b) {
9919 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9923 vector
unsigned char __b) {
9924 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9928 vector
signed char __b) {
9929 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9933 vector
unsigned char __b) {
9934 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9939 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9945 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9950 vector
signed char __b) {
9951 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9955 vector
unsigned char __b) {
9956 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9961vec_slo(vector
signed long long __a, vector
signed char __b) {
9962 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9967vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9968 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9972static __inline__ vector
unsigned long long __ATTRS_o_ai
9973vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9974 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
9978static __inline__ vector
unsigned long long __ATTRS_o_ai
9979vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
9980 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
9989 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9995 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10001 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10007 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10012 vector
signed char __b) {
10013 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10017 vector
unsigned char __b) {
10018 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10023 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10029 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10034 vector
signed char __b) {
10035 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10039 vector
unsigned char __b) {
10040 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10044 vector
signed char __b) {
10045 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10049 vector
unsigned char __b) {
10050 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10055 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10061 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10066 vector
signed char __b) {
10067 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10071 vector
unsigned char __b) {
10072 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10094 unsigned char b0 = (
__b & 0x07) * 2;
10095 unsigned char b1 = b0 + 1;
10097 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10098 b0, b1, b0, b1, b0, b1));
10103 unsigned char b0 = (
__b & 0x07) * 2;
10104 unsigned char b1 = b0 + 1;
10106 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10107 b0, b1, b0, b1, b0, b1));
10112 unsigned char b0 = (
__b & 0x07) * 2;
10113 unsigned char b1 = b0 + 1;
10115 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10116 b0, b1, b0, b1, b0, b1));
10120 unsigned const int __b) {
10121 unsigned char b0 = (
__b & 0x07) * 2;
10122 unsigned char b1 = b0 + 1;
10124 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10125 b0, b1, b0, b1, b0, b1));
10130 unsigned char b0 = (
__b & 0x03) * 4;
10131 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10133 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10134 b2, b3, b0, b1, b2, b3));
10139 unsigned char b0 = (
__b & 0x03) * 4;
10140 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10142 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10143 b2, b3, b0, b1, b2, b3));
10148 unsigned char b0 = (
__b & 0x03) * 4;
10149 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10151 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10152 b2, b3, b0, b1, b2, b3));
10156 unsigned const int __b) {
10157 unsigned char b0 = (
__b & 0x03) * 4;
10158 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10160 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10161 b2, b3, b0, b1, b2, b3));
10166 unsigned const int __b) {
10167 unsigned char b0 = (
__b & 0x01) * 8;
10168 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10169 b6 = b0 + 6, b7 = b0 + 7;
10171 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10172 b2, b3, b4, b5, b6, b7));
10176 unsigned char b0 = (
__b & 0x01) * 8;
10177 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10178 b6 = b0 + 6, b7 = b0 + 7;
10180 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10181 b2, b3, b4, b5, b6, b7));
10185 unsigned char b0 = (
__b & 0x01) * 8;
10186 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10187 b6 = b0 + 6, b7 = b0 + 7;
10189 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10190 b2, b3, b4, b5, b6, b7));
10192static __inline__ vector
unsigned long long __ATTRS_o_ai
10194 unsigned char b0 = (
__b & 0x01) * 8;
10195 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10196 b6 = b0 + 6, b7 = b0 + 7;
10198 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10199 b2, b3, b4, b5, b6, b7));
10205#define __builtin_altivec_vspltb vec_vspltb
10218 unsigned char __b) {
10224#define __builtin_altivec_vsplth vec_vsplth
10227 unsigned char __b) {
10229 unsigned char b1 =
__b + 1;
10231 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10238 unsigned char b1 =
__b + 1;
10240 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10247 unsigned char b1 =
__b + 1;
10249 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10254 unsigned char __b) {
10256 unsigned char b1 =
__b + 1;
10258 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10264#define __builtin_altivec_vspltw vec_vspltw
10267 unsigned char __b) {
10269 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10271 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10272 b1, b2, b3,
__b, b1, b2, b3));
10278 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10280 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10281 b1, b2, b3,
__b, b1, b2, b3));
10285 unsigned char __b) {
10287 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10289 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10290 b1, b2, b3,
__b, b1, b2, b3));
10294 unsigned char __b) {
10296 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10298 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10299 b1, b2, b3,
__b, b1, b2, b3));
10304#define __builtin_altivec_vspltisb vec_splat_s8
10309 return (vector
signed char)(
__a);
10317 return (vector
signed char)(
__a);
10322#define __builtin_altivec_vspltish vec_splat_s16
10326 return (vector
short)(
__a);
10333 return (vector
short)(
__a);
10338#define __builtin_altivec_vspltisw vec_splat_s32
10342 return (vector
int)(
__a);
10349 return (vector
int)(
__a);
10357 return (vector
unsigned char)(
__a);
10365 return (vector
unsigned short)(
__a);
10373 return (vector
unsigned int)(
__a);
10383 (
__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
10388 return (vector
signed char)
vec_sr((vector
unsigned char)
__a,
__b);
10394 (
__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
10398 vector
unsigned short __b) {
10399 return (vector
short)
vec_sr((vector
unsigned short)
__a,
__b);
10405 (
__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
10409 vector
unsigned int __b) {
10410 return (vector
int)
vec_sr((vector
unsigned int)
__a,
__b);
10413#ifdef __POWER8_VECTOR__
10414static __inline__ vector
unsigned long long __ATTRS_o_ai
10415vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10416 return __a >> (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
10421vec_sr(vector
long long __a, vector
unsigned long long __b) {
10422 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10424#elif defined(__VSX__)
10425static __inline__ vector
unsigned long long __ATTRS_o_ai
10426vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10427 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10433 vector
unsigned long long __swapshift =
10434 __builtin_shufflevector(
__b,
__b, 1, 0);
10435 vector
unsigned long long __leftelt =
10436 (vector
unsigned long long)__builtin_altivec_vsro(
10437 (vector
signed int)
__a, (vector
signed int)__swapshift);
10438#ifdef __LITTLE_ENDIAN__
10439 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10440 (vector
signed int)__leftelt,
10441 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 0));
10443 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10444 (vector
signed int)__leftelt,
10445 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 15));
10447 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
10448 vector
unsigned long long __rightelt =
10449 (vector
unsigned long long)__builtin_altivec_vsro((vector
signed int)
__a,
10450 (vector
signed int)
__b);
10451#ifdef __LITTLE_ENDIAN__
10452 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10453 (vector
signed int)__rightelt,
10454 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
10455 return __builtin_shufflevector(__rightelt, __leftelt, 1, 3);
10457 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10458 (vector
signed int)__rightelt,
10459 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
10460 return __builtin_shufflevector(__leftelt, __rightelt, 0, 2);
10465vec_sr(vector
long long __a, vector
unsigned long long __b) {
10466 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10472#define __builtin_altivec_vsrb vec_vsrb
10486#define __builtin_altivec_vsrh vec_vsrh
10500#define __builtin_altivec_vsrw vec_vsrw
10503 vector
unsigned int __b) {
10516 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10521 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10525 vector
unsigned short __b) {
10526 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10531 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10535 vector
unsigned int __b) {
10536 return __builtin_altivec_vsraw(
__a,
__b);
10541 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10544#ifdef __POWER8_VECTOR__
10546vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10550static __inline__ vector
unsigned long long __ATTRS_o_ai
10551vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10552 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10554#elif defined(__VSX__)
10556vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10557 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10561static __inline__ vector
unsigned long long __ATTRS_o_ai
10562vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10563 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10564 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10572 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10577 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10584 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10589 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10595 vector
unsigned int __b) {
10596 return __builtin_altivec_vsraw(
__a,
__b);
10601 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10608 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10614 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10620 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10626 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10632 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10638 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10644 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10650 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10656 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10661 vector
unsigned char __b) {
10662 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10666 vector
unsigned short __b) {
10667 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10671 vector
unsigned int __b) {
10672 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10677 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10683 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10689 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10695 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10701 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10707 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10712 vector
unsigned char __b) {
10713 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10717 vector
unsigned short __b) {
10718 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10722 vector
unsigned int __b) {
10723 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10727 vector
unsigned char __b) {
10728 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10732 vector
unsigned short __b) {
10733 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10737 vector
unsigned int __b) {
10738 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10743 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10749 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10755 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10761 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10767 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10773 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10779vec_srl(vector
signed long long __a, vector
unsigned char __b) {
10780 return (vector
signed long long)__builtin_altivec_vsr((vector
int)
__a,
10784static __inline__ vector
unsigned long long __ATTRS_o_ai
10785vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
10786 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)
__a,
10795 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10801 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10807 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10813 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10819 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10825 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10831 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10837 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10843 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10848 vector
unsigned char __b) {
10849 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10853 vector
unsigned short __b) {
10854 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10858 vector
unsigned int __b) {
10859 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10864 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10870 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10876 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10882 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10888 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10894 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10899 vector
unsigned char __b) {
10900 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10904 vector
unsigned short __b) {
10905 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10909 vector
unsigned int __b) {
10910 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10914 vector
unsigned char __b) {
10915 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10919 vector
unsigned short __b) {
10920 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10924 vector
unsigned int __b) {
10925 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10930 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10936 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10942 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10948 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10954 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10960 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10968 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
10974 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
10980 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
10986 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
10991 vector
signed char __b) {
10992 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
10996 vector
unsigned char __b) {
10997 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11002 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11008 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11013 vector
signed char __b) {
11014 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11018 vector
unsigned char __b) {
11019 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11023 vector
signed char __b) {
11024 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11028 vector
unsigned char __b) {
11029 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11034 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11040 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11045 vector
signed char __b) {
11046 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11050 vector
unsigned char __b) {
11051 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11056vec_sro(vector
signed long long __a, vector
signed char __b) {
11057 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11062vec_sro(vector
signed long long __a, vector
unsigned char __b) {
11063 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11067static __inline__ vector
unsigned long long __ATTRS_o_ai
11068vec_sro(vector
unsigned long long __a, vector
signed char __b) {
11069 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11073static __inline__ vector
unsigned long long __ATTRS_o_ai
11074vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
11075 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11084 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11090 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11096 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11102 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11107 vector
signed char __b) {
11108 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11112 vector
unsigned char __b) {
11113 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11118 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11124 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11129 vector
signed char __b) {
11130 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11134 vector
unsigned char __b) {
11135 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11139 vector
signed char __b) {
11140 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11144 vector
unsigned char __b) {
11145 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11150 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11156 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11161 vector
signed char __b) {
11162 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11166 vector
unsigned char __b) {
11167 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11173 vector
signed char *
__c) {
11174 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11178 signed char *
__c) {
11179 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11183 vector
unsigned char *
__c) {
11184 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11188 unsigned char *
__c) {
11189 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11193 signed char *
__c) {
11194 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11198 unsigned char *
__c) {
11199 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11203 vector
bool char *
__c) {
11204 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11208 vector
short *
__c) {
11209 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11214 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11218 vector
unsigned short *
__c) {
11219 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11223 unsigned short *
__c) {
11224 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11229 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11233 unsigned short *
__c) {
11234 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11238 vector
bool short *
__c) {
11239 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11244 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11248 unsigned short *
__c) {
11249 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11253 vector pixel *
__c) {
11254 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11267 vector
unsigned int *
__c) {
11268 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11272 unsigned int *
__c) {
11273 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11278 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11282 unsigned int *
__c) {
11283 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11287 vector
bool int *
__c) {
11288 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11292 vector
float *
__c) {
11293 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11298 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11304 vector
signed char *
__c) {
11305 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11309 signed char *
__c) {
11310 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11314 vector
unsigned char *
__c) {
11315 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11319 unsigned char *
__c) {
11320 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11324 signed char *
__c) {
11325 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11329 unsigned char *
__c) {
11330 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11334 vector
bool char *
__c) {
11335 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11339 vector
short *
__c) {
11340 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11345 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11349 vector
unsigned short *
__c) {
11350 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11354 unsigned short *
__c) {
11355 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11360 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11364 unsigned short *
__c) {
11365 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11369 vector
bool short *
__c) {
11370 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11375 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11379 unsigned short *
__c) {
11380 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11384 vector pixel *
__c) {
11385 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11399 vector
unsigned int *
__c) {
11400 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11404 unsigned int *
__c) {
11405 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11410 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11414 unsigned int *
__c) {
11415 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11419 vector
bool int *
__c) {
11420 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11424 vector
float *
__c) {
11425 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11430 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11436 signed char *
__c) {
11437 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11441 unsigned char *
__c) {
11442 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11446 signed char *
__c) {
11447 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11451 unsigned char *
__c) {
11452 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11457 __builtin_altivec_stvehx(
__a,
__b,
__c);
11461 unsigned short *
__c) {
11462 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11467 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11471 unsigned short *
__c) {
11472 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11477 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11481 unsigned short *
__c) {
11482 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11486 __builtin_altivec_stvewx(
__a,
__b,
__c);
11490 unsigned int *
__c) {
11491 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11496 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11500 unsigned int *
__c) {
11501 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11506 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11512 signed char *
__c) {
11513 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11517 long __b,
unsigned char *
__c) {
11518 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11522 signed char *
__c) {
11523 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11527 unsigned char *
__c) {
11528 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11535 __builtin_altivec_stvehx(
__a,
__b,
__c);
11539 long __b,
unsigned short *
__c) {
11540 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11545 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11549 unsigned short *
__c) {
11550 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11555 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11559 unsigned short *
__c) {
11560 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11567 __builtin_altivec_stvewx(
__a,
__b,
__c);
11571 unsigned int *
__c) {
11572 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11577 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11581 unsigned int *
__c) {
11582 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11587 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11593 vector
signed char *
__c) {
11594 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11598 signed char *
__c) {
11599 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11603 vector
unsigned char *
__c) {
11604 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11608 unsigned char *
__c) {
11609 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11613 signed char *
__c) {
11614 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11618 unsigned char *
__c) {
11619 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11623 vector
bool char *
__c) {
11624 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11628 vector
short *
__c) {
11629 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11634 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11638 vector
unsigned short *
__c) {
11639 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11643 unsigned short *
__c) {
11644 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11649 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11653 unsigned short *
__c) {
11654 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11658 vector
bool short *
__c) {
11659 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11664 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11668 unsigned short *
__c) {
11669 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11673 vector pixel *
__c) {
11674 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11679 __builtin_altivec_stvxl(
__a,
__b,
__c);
11683 __builtin_altivec_stvxl(
__a,
__b,
__c);
11687 vector
unsigned int *
__c) {
11688 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11692 unsigned int *
__c) {
11693 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11698 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11702 unsigned int *
__c) {
11703 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11707 vector
bool int *
__c) {
11708 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11712 vector
float *
__c) {
11713 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11718 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11724 vector
signed char *
__c) {
11725 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11729 signed char *
__c) {
11730 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11734 vector
unsigned char *
__c) {
11735 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11739 unsigned char *
__c) {
11740 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11744 signed char *
__c) {
11745 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11749 unsigned char *
__c) {
11750 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11754 vector
bool char *
__c) {
11755 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11759 vector
short *
__c) {
11760 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11765 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11770 vector
unsigned short *
__c) {
11771 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11775 int __b,
unsigned short *
__c) {
11776 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11781 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11785 unsigned short *
__c) {
11786 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11790 vector
bool short *
__c) {
11791 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11796 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11800 unsigned short *
__c) {
11801 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11805 vector pixel *
__c) {
11806 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11811 __builtin_altivec_stvxl(
__a,
__b,
__c);
11816 __builtin_altivec_stvxl(
__a,
__b,
__c);
11820 vector
unsigned int *
__c) {
11821 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11825 unsigned int *
__c) {
11826 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11831 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11835 unsigned int *
__c) {
11836 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11840 vector
bool int *
__c) {
11841 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11845 vector
float *
__c) {
11846 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11851 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11863 return (vector
signed char)
__a -
__b;
11868 return __a - (vector
signed char)
__b;
11878 return (vector
unsigned char)
__a -
__b;
11883 return __a - (vector
unsigned char)
__b;
11887 vector
short __b) {
11892 vector
short __b) {
11893 return (vector
short)
__a -
__b;
11897 vector
bool short __b) {
11898 return __a - (vector short)
__b;
11908 return (vector
unsigned short)
__a -
__b;
11913 return __a - (vector
unsigned short)
__b;
11923 return (vector
int)
__a -
__b;
11927 vector
bool int __b) {
11938 return (vector
unsigned int)
__a -
__b;
11946#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
11947 defined(__SIZEOF_INT128__)
11949vec_sub(vector
signed __int128
__a, vector
signed __int128
__b) {
11953static __inline__ vector
unsigned __int128
__ATTRS_o_ai
11954vec_sub(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
11962vec_sub(vector
signed long long __a, vector
signed long long __b) {
11966static __inline__ vector
unsigned long long __ATTRS_o_ai
11967vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11972 vector
double __b) {
11978 vector
float __b) {
11984#define __builtin_altivec_vsububm vec_vsububm
11993 return (vector
signed char)
__a -
__b;
11998 return __a - (vector
signed char)
__b;
12008 return (vector
unsigned char)
__a -
__b;
12013 return __a - (vector
unsigned char)
__b;
12018#define __builtin_altivec_vsubuhm vec_vsubuhm
12021 vector
short __b) {
12026 vector
short __b) {
12027 return (vector
short)
__a -
__b;
12031 vector
bool short __b) {
12032 return __a - (vector short)
__b;
12042 return (vector
unsigned short)
__a -
__b;
12047 return __a - (vector
unsigned short)
__b;
12052#define __builtin_altivec_vsubuwm vec_vsubuwm
12061 return (vector
int)
__a -
__b;
12065 vector
bool int __b) {
12076 return (vector
unsigned int)
__a -
__b;
12086#define __builtin_altivec_vsubfp vec_vsubfp
12088static __inline__ vector
float __attribute__((__always_inline__))
12089vec_vsubfp(vector
float __a, vector
float __b) {
12097 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)
__a,
12098 (vector
unsigned int)
__b);
12103 return __builtin_altivec_vsubcuw(
__a,
__b);
12106#ifdef __POWER8_VECTOR__
12107#ifdef __SIZEOF_INT128__
12108static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12109vec_subc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12110 return __builtin_altivec_vsubcuq(
__a,
__b);
12114vec_subc(vector
signed __int128
__a, vector
signed __int128
__b) {
12115 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12116 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12120static __inline__ vector
unsigned char __attribute__((__always_inline__))
12121vec_subc_u128(vector
unsigned char __a, vector
unsigned char __b) {
12122 return (vector
unsigned char)__builtin_altivec_vsubcuq_c(
12123 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
12129static __inline__ vector
unsigned int __attribute__((__always_inline__))
12130vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
12131 return __builtin_altivec_vsubcuw(
__a,
__b);
12138 return __builtin_altivec_vsubsbs(
__a,
__b);
12143 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12148 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12153 return __builtin_altivec_vsububs(
__a,
__b);
12158 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12163 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12167 vector
short __b) {
12168 return __builtin_altivec_vsubshs(
__a,
__b);
12172 vector
short __b) {
12173 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12177 vector
bool short __b) {
12178 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12183 return __builtin_altivec_vsubuhs(
__a,
__b);
12188 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12193 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12198 return __builtin_altivec_vsubsws(
__a,
__b);
12203 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12207 vector
bool int __b) {
12208 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12213 return __builtin_altivec_vsubuws(
__a,
__b);
12218 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12223 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12230 return __builtin_altivec_vsubsbs(
__a,
__b);
12235 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12240 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12247 return __builtin_altivec_vsububs(
__a,
__b);
12252 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12257 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12263 vector
short __b) {
12264 return __builtin_altivec_vsubshs(
__a,
__b);
12268 vector
short __b) {
12269 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12273 vector
bool short __b) {
12274 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12281 return __builtin_altivec_vsubuhs(
__a,
__b);
12286 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12291 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12298 return __builtin_altivec_vsubsws(
__a,
__b);
12303 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12307 vector
bool int __b) {
12308 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12315 return __builtin_altivec_vsubuws(
__a,
__b);
12320 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12325 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12328#ifdef __POWER8_VECTOR__
12331#ifdef __SIZEOF_INT128__
12333vec_vsubuqm(vector
signed __int128
__a, vector
signed __int128
__b) {
12337static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12338vec_vsubuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12343static __inline__ vector
unsigned char __attribute__((__always_inline__))
12344vec_sub_u128(vector
unsigned char __a, vector
unsigned char __b) {
12345 return (vector
unsigned char)__builtin_altivec_vsubuqm(
__a,
__b);
12350#ifdef __SIZEOF_INT128__
12352vec_vsubeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
12353 vector
signed __int128
__c) {
12354 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12355 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12356 (vector
unsigned __int128)
__c);
12359static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12360vec_vsubeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12361 vector
unsigned __int128
__c) {
12362 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12367 vector
signed __int128
__c) {
12368 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12369 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12370 (vector
unsigned __int128)
__c);
12373static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12374vec_sube(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12375 vector
unsigned __int128
__c) {
12376 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12380static __inline__ vector
unsigned char __attribute__((__always_inline__))
12381vec_sube_u128(vector
unsigned char __a, vector
unsigned char __b,
12382 vector
unsigned char __c) {
12383 return (vector
unsigned char)__builtin_altivec_vsubeuqm_c(
12384 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12385 (vector
unsigned char)
__c);
12390#ifdef __SIZEOF_INT128__
12392vec_vsubcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
12393 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12394 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12397static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12398vec_vsubcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12399 return __builtin_altivec_vsubcuq(
__a,
__b);
12405vec_vsubecuq(vector
signed __int128
__a, vector
signed __int128
__b,
12406 vector
signed __int128
__c) {
12407 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12408 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12409 (vector
unsigned __int128)
__c);
12412static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12413vec_vsubecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12414 vector
unsigned __int128
__c) {
12415 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12419#ifdef __powerpc64__
12421vec_subec(vector
signed int __a, vector
signed int __b,
12422 vector
signed int __c) {
12427vec_subec(vector
unsigned int __a, vector
unsigned int __b,
12428 vector
unsigned int __c) {
12433#ifdef __SIZEOF_INT128__
12435vec_subec(vector
signed __int128
__a, vector
signed __int128
__b,
12436 vector
signed __int128
__c) {
12437 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12438 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12439 (vector
unsigned __int128)
__c);
12442static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12443vec_subec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12444 vector
unsigned __int128
__c) {
12445 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12449static __inline__ vector
unsigned char __attribute__((__always_inline__))
12450vec_subec_u128(vector
unsigned char __a, vector
unsigned char __b,
12451 vector
unsigned char __c) {
12452 return (vector
unsigned char)__builtin_altivec_vsubecuq_c(
12453 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12454 (vector
unsigned char)
__c);
12460 vector
signed int __c) {
12461 vector
signed int __mask = {1, 1, 1, 1};
12462 vector
signed int __carry =
__c & __mask;
12468 vector
unsigned int __c) {
12469 vector
unsigned int __mask = {1, 1, 1, 1};
12470 vector
unsigned int __carry =
__c & __mask;
12477 return __builtin_altivec_vsum4sbs(
__a,
__b);
12482 return __builtin_altivec_vsum4ubs(
__a,
__b);
12487 return __builtin_altivec_vsum4shs(
__a,
__b);
12492static __inline__ vector
int __attribute__((__always_inline__))
12493vec_vsum4sbs(vector
signed char __a, vector
int __b) {
12494 return __builtin_altivec_vsum4sbs(
__a,
__b);
12499static __inline__ vector
unsigned int __attribute__((__always_inline__))
12500vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
12501 return __builtin_altivec_vsum4ubs(
__a,
__b);
12506static __inline__ vector
int __attribute__((__always_inline__))
12507vec_vsum4shs(vector
signed short __a, vector
int __b) {
12508 return __builtin_altivec_vsum4shs(
__a,
__b);
12519static __inline__ vector
signed int __attribute__((__always_inline__))
12520vec_sum2s(vector
int __a, vector
int __b) {
12521#ifdef __LITTLE_ENDIAN__
12523 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12525 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12526 return (vector
signed int)
vec_perm(
12527 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12530 return __builtin_altivec_vsum2sws(
__a,
__b);
12536static __inline__ vector
signed int __attribute__((__always_inline__))
12537vec_vsum2sws(vector
int __a, vector
int __b) {
12538#ifdef __LITTLE_ENDIAN__
12540 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12542 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12543 return (vector
signed int)
vec_perm(
12544 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12547 return __builtin_altivec_vsum2sws(
__a,
__b);
12559static __inline__ vector
signed int __attribute__((__always_inline__))
12560vec_sums(vector
signed int __a, vector
signed int __b) {
12561#ifdef __LITTLE_ENDIAN__
12563 __b = __builtin_altivec_vsumsws(
__a,
__b);
12564 return (vector
signed int)(0, 0, 0,
__b[0]);
12566 return __builtin_altivec_vsumsws(
__a,
__b);
12572static __inline__ vector
signed int __attribute__((__always_inline__))
12573vec_vsumsws(vector
signed int __a, vector
signed int __b) {
12574#ifdef __LITTLE_ENDIAN__
12576 __b = __builtin_altivec_vsumsws(
__a,
__b);
12577 return (vector
signed int)(0, 0, 0,
__b[0]);
12579 return __builtin_altivec_vsumsws(
__a,
__b);
12587 return __builtin_vsx_xvrspiz(
__a);
12589 return __builtin_altivec_vrfiz(
__a);
12595 return __builtin_vsx_xvrdpiz(
__a);
12612static __inline__ vector
float __attribute__((__always_inline__))
12613vec_vrfiz(vector
float __a) {
12614 return __builtin_altivec_vrfiz(
__a);
12621#ifdef __LITTLE_ENDIAN__
12622#define vec_vupkhpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12623#define vec_vupklpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12625#define vec_vupkhpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12626#define vec_vupklpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12631#ifdef __LITTLE_ENDIAN__
12632 return __builtin_altivec_vupklsb((vector
char)
__a);
12634 return __builtin_altivec_vupkhsb((vector
char)
__a);
12640#ifdef __LITTLE_ENDIAN__
12641 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12643 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12648#ifdef __LITTLE_ENDIAN__
12649 return __builtin_altivec_vupklsh(
__a);
12651 return __builtin_altivec_vupkhsh(
__a);
12657#ifdef __LITTLE_ENDIAN__
12658 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12660 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12666#ifdef __LITTLE_ENDIAN__
12667 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12669 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12673#ifdef __POWER8_VECTOR__
12675#ifdef __LITTLE_ENDIAN__
12676 return __builtin_altivec_vupklsw(
__a);
12678 return __builtin_altivec_vupkhsw(
__a);
12684#ifdef __LITTLE_ENDIAN__
12685 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12687 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12693 return (vector
double)(
__a[0],
__a[1]);
12701#ifdef __LITTLE_ENDIAN__
12702 return __builtin_altivec_vupklsb((vector
char)
__a);
12704 return __builtin_altivec_vupkhsb((vector
char)
__a);
12710#ifdef __LITTLE_ENDIAN__
12711 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12713 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12720#ifdef __LITTLE_ENDIAN__
12721 return __builtin_altivec_vupklsh(
__a);
12723 return __builtin_altivec_vupkhsh(
__a);
12729#ifdef __LITTLE_ENDIAN__
12730 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12732 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12738#ifdef __LITTLE_ENDIAN__
12739 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12741 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12747#ifdef __POWER8_VECTOR__
12748static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
12749#ifdef __LITTLE_ENDIAN__
12750 return __builtin_altivec_vupklsw(
__a);
12752 return __builtin_altivec_vupkhsw(
__a);
12757vec_vupkhsw(vector
bool int __a) {
12758#ifdef __LITTLE_ENDIAN__
12759 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12761 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12770#ifdef __LITTLE_ENDIAN__
12771 return __builtin_altivec_vupkhsb((vector
char)
__a);
12773 return __builtin_altivec_vupklsb((vector
char)
__a);
12779#ifdef __LITTLE_ENDIAN__
12780 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12782 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12787#ifdef __LITTLE_ENDIAN__
12788 return __builtin_altivec_vupkhsh(
__a);
12790 return __builtin_altivec_vupklsh(
__a);
12796#ifdef __LITTLE_ENDIAN__
12797 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12799 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12805#ifdef __LITTLE_ENDIAN__
12806 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12808 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12812#ifdef __POWER8_VECTOR__
12814#ifdef __LITTLE_ENDIAN__
12815 return __builtin_altivec_vupkhsw(
__a);
12817 return __builtin_altivec_vupklsw(
__a);
12823#ifdef __LITTLE_ENDIAN__
12824 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12826 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12832 return (vector
double)(
__a[2],
__a[3]);
12840#ifdef __LITTLE_ENDIAN__
12841 return __builtin_altivec_vupkhsb((vector
char)
__a);
12843 return __builtin_altivec_vupklsb((vector
char)
__a);
12849#ifdef __LITTLE_ENDIAN__
12850 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12852 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12859#ifdef __LITTLE_ENDIAN__
12860 return __builtin_altivec_vupkhsh(
__a);
12862 return __builtin_altivec_vupklsh(
__a);
12868#ifdef __LITTLE_ENDIAN__
12869 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12871 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12877#ifdef __LITTLE_ENDIAN__
12878 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12880 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12886#ifdef __POWER8_VECTOR__
12887static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
12888#ifdef __LITTLE_ENDIAN__
12889 return __builtin_altivec_vupkhsw(
__a);
12891 return __builtin_altivec_vupklsw(
__a);
12896vec_vupklsw(vector
bool int __a) {
12897#ifdef __LITTLE_ENDIAN__
12898 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12900 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12910vec_vsx_ld(
int __a,
const vector
bool int *
__b) {
12911 return (vector
bool int)__builtin_vsx_lxvw4x(
__a,
__b);
12915vec_vsx_ld(
int __a,
const vector
signed int *
__b) {
12916 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12920vec_vsx_ld(
int __a,
const signed int *
__b) {
12921 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12925vec_vsx_ld(
int __a,
const vector
unsigned int *
__b) {
12926 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12930vec_vsx_ld(
int __a,
const unsigned int *
__b) {
12931 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12935vec_vsx_ld(
int __a,
const vector
float *
__b) {
12936 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12940 const float *
__b) {
12941 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12945vec_vsx_ld(
int __a,
const vector
signed long long *
__b) {
12946 return (vector
signed long long)__builtin_vsx_lxvd2x(
__a,
__b);
12949static __inline__ vector
unsigned long long __ATTRS_o_ai
12950vec_vsx_ld(
int __a,
const vector
unsigned long long *
__b) {
12951 return (vector
unsigned long long)__builtin_vsx_lxvd2x(
__a,
__b);
12955vec_vsx_ld(
int __a,
const vector
double *
__b) {
12956 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12960vec_vsx_ld(
int __a,
const double *
__b) {
12961 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12965vec_vsx_ld(
int __a,
const vector
bool short *
__b) {
12966 return (vector
bool short)__builtin_vsx_lxvw4x(
__a,
__b);
12970vec_vsx_ld(
int __a,
const vector
signed short *
__b) {
12971 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
12975vec_vsx_ld(
int __a,
const signed short *
__b) {
12976 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
12980vec_vsx_ld(
int __a,
const vector
unsigned short *
__b) {
12981 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
12985vec_vsx_ld(
int __a,
const unsigned short *
__b) {
12986 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
12990vec_vsx_ld(
int __a,
const vector
bool char *
__b) {
12991 return (vector
bool char)__builtin_vsx_lxvw4x(
__a,
__b);
12995vec_vsx_ld(
int __a,
const vector
signed char *
__b) {
12996 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13000vec_vsx_ld(
int __a,
const signed char *
__b) {
13001 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13005vec_vsx_ld(
int __a,
const vector
unsigned char *
__b) {
13006 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13010vec_vsx_ld(
int __a,
const unsigned char *
__b) {
13011 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13021 vector
bool int *
__c) {
13022 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13027 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13031 unsigned int *
__c) {
13032 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13036 vector
signed int *
__c) {
13037 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13042 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13046 vector
unsigned int *
__c) {
13047 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13051 unsigned int *
__c) {
13052 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13056 vector
float *
__c) {
13057 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13062 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13065static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
13067 vector
signed long long *
__c) {
13068 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13071static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
13073 vector
unsigned long long *
__c) {
13074 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13078 vector
double *
__c) {
13079 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13084 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13088 vector
bool short *
__c) {
13089 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13093 signed short *
__c) {
13094 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13098 unsigned short *
__c) {
13099 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13102 vector
signed short *
__c) {
13103 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13107 signed short *
__c) {
13108 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13111static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13113 vector
unsigned short *
__c) {
13114 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13117static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13118 int __b,
unsigned short *
__c) {
13119 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13123 vector
bool char *
__c) {
13124 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13128 signed char *
__c) {
13129 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13133 unsigned char *
__c) {
13134 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13138 vector
signed char *
__c) {
13139 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13143 signed char *
__c) {
13144 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13147static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13149 vector
unsigned char *
__c) {
13150 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13153static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13154 int __b,
unsigned char *
__c) {
13155 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13161#define vec_xxpermdi __builtin_vsx_xxpermdi
13162#define vec_xxsldwi __builtin_vsx_xxsldwi
13163#define vec_permi(__a, __b, __c) \
13164 _Generic((__a), vector signed long long \
13165 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13166 (((__c)&0x1) + 2)), \
13167 vector unsigned long long \
13168 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13169 (((__c)&0x1) + 2)), \
13171 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13172 (((__c)&0x1) + 2)))
13177#define __builtin_altivec_vxor vec_xor
13186 return (vector
signed char)
__a ^
__b;
13191 return __a ^ (vector
signed char)
__b;
13201 return (vector
unsigned char)
__a ^
__b;
13206 return __a ^ (vector
unsigned char)
__b;
13210 vector
bool char __b) {
13215 vector
short __b) {
13220 vector
short __b) {
13221 return (vector
short)
__a ^
__b;
13225 vector
bool short __b) {
13226 return __a ^ (vector short)
__b;
13236 return (vector
unsigned short)
__a ^
__b;
13241 return __a ^ (vector
unsigned short)
__b;
13256 return (vector
int)
__a ^
__b;
13260 vector
bool int __b) {
13271 return (vector
unsigned int)
__a ^
__b;
13280 vector
bool int __b) {
13285 vector
float __b) {
13286 vector
unsigned int __res =
13287 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13288 return (vector
float)__res;
13292 vector
float __b) {
13293 vector
unsigned int __res =
13294 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13295 return (vector
float)__res;
13299 vector
bool int __b) {
13300 vector
unsigned int __res =
13301 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13302 return (vector
float)__res;
13307vec_xor(vector
signed long long __a, vector
signed long long __b) {
13312vec_xor(vector
bool long long __a, vector
signed long long __b) {
13313 return (vector
signed long long)
__a ^
__b;
13317vec_xor(vector
signed long long __a, vector
bool long long __b) {
13318 return __a ^ (vector
signed long long)
__b;
13321static __inline__ vector
unsigned long long __ATTRS_o_ai
13322vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
13326static __inline__ vector
unsigned long long __ATTRS_o_ai
13327vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
13328 return (vector
unsigned long long)
__a ^
__b;
13331static __inline__ vector
unsigned long long __ATTRS_o_ai
13332vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
13333 return __a ^ (vector
unsigned long long)
__b;
13337vec_xor(vector
bool long long __a, vector
bool long long __b) {
13342 vector
double __b) {
13343 return (vector
double)((vector
unsigned long long)
__a ^
13344 (vector
unsigned long long)
__b);
13349 return (vector
double)((vector
unsigned long long)
__a ^
13350 (vector
unsigned long long)
__b);
13354 vector
double __b) {
13355 return (vector
double)((vector
unsigned long long)
__a ^
13356 (vector
unsigned long long)
__b);
13369 return (vector
signed char)
__a ^
__b;
13374 return __a ^ (vector
signed char)
__b;
13384 return (vector
unsigned char)
__a ^
__b;
13389 return __a ^ (vector
unsigned char)
__b;
13393 vector
bool char __b) {
13398 vector
short __b) {
13403 vector
short __b) {
13404 return (vector
short)
__a ^
__b;
13408 vector
bool short __b) {
13409 return __a ^ (vector short)
__b;
13419 return (vector
unsigned short)
__a ^
__b;
13424 return __a ^ (vector
unsigned short)
__b;
13439 return (vector
int)
__a ^
__b;
13443 vector
bool int __b) {
13454 return (vector
unsigned int)
__a ^
__b;
13463 vector
bool int __b) {
13468 vector
float __b) {
13469 vector
unsigned int __res =
13470 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13471 return (vector
float)__res;
13475 vector
float __b) {
13476 vector
unsigned int __res =
13477 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13478 return (vector
float)__res;
13482 vector
bool int __b) {
13483 vector
unsigned int __res =
13484 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13485 return (vector
float)__res;
13490vec_vxor(vector
signed long long __a, vector
signed long long __b) {
13495vec_vxor(vector
bool long long __a, vector
signed long long __b) {
13496 return (vector
signed long long)
__a ^
__b;
13500vec_vxor(vector
signed long long __a, vector
bool long long __b) {
13501 return __a ^ (vector
signed long long)
__b;
13504static __inline__ vector
unsigned long long __ATTRS_o_ai
13505vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
13509static __inline__ vector
unsigned long long __ATTRS_o_ai
13510vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
13511 return (vector
unsigned long long)
__a ^
__b;
13514static __inline__ vector
unsigned long long __ATTRS_o_ai
13515vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
13516 return __a ^ (vector
unsigned long long)
__b;
13601#ifdef __POWER9_VECTOR__
13603#define vec_insert4b __builtin_vsx_insertword
13604#define vec_extract4b __builtin_vsx_extractuword
13609vec_extract_exp(vector
float __a) {
13610 return __builtin_vsx_xvxexpsp(
__a);
13613static __inline__ vector
unsigned long long __ATTRS_o_ai
13614vec_extract_exp(vector
double __a) {
13615 return __builtin_vsx_xvxexpdp(
__a);
13621vec_extract_sig(vector
float __a) {
13622 return __builtin_vsx_xvxsigsp(
__a);
13625static __inline__ vector
unsigned long long __ATTRS_o_ai
13626vec_extract_sig (vector
double __a) {
13627 return __builtin_vsx_xvxsigdp(
__a);
13631vec_extract_fp32_from_shorth(vector
unsigned short __a) {
13632 vector
unsigned short __b =
13633#ifdef __LITTLE_ENDIAN__
13634 __builtin_shufflevector(
__a,
__a, 0, -1, 1, -1, 2, -1, 3, -1);
13636 __builtin_shufflevector(
__a,
__a, -1, 0, -1, 1, -1, 2, -1, 3);
13638 return __builtin_vsx_xvcvhpsp(
__b);
13642vec_extract_fp32_from_shortl(vector
unsigned short __a) {
13643 vector
unsigned short __b =
13644#ifdef __LITTLE_ENDIAN__
13645 __builtin_shufflevector(
__a,
__a, 4, -1, 5, -1, 6, -1, 7, -1);
13647 __builtin_shufflevector(
__a,
__a, -1, 4, -1, 5, -1, 6, -1, 7);
13649 return __builtin_vsx_xvcvhpsp(
__b);
13668 vector
bool char __b,
13705 vector
bool int __b,
13718static __inline__ vector
unsigned long long __ATTRS_o_ai
13777 const short *
__b) {
13782 const vector
short *
__b) {
13806 const vector pixel *
__b) {
13816 const vector
int *
__b) {
13840 const float *
__b) {
13845 const vector
float *
__b) {
13883 const short *
__b) {
13888 const vector
short *
__b) {
13912 const vector pixel *
__b) {
13922 const vector
int *
__b) {
13946 const float *
__b) {
13951 vector
float *
__b) {
13989 const short *
__b) {
13994 const vector
short *
__b) {
14018 const vector pixel *
__b) {
14028 const vector
int *
__b) {
14052 const float *
__b) {
14057 const vector
float *
__b) {
14095 const short *
__b) {
14100 const vector
short *
__b) {
14124 const vector pixel *
__b) {
14134 const vector
int *
__b) {
14158 const float *
__b) {
14163 const vector
float *
__b) {
14171 signed char *
__c) {
14177 vector
signed char *
__c) {
14184 unsigned char *
__c) {
14190 vector
unsigned char *
__c) {
14197 vector
bool char *
__c) {
14210 vector
short *
__c) {
14217 int __b,
unsigned short *
__c) {
14224 vector
unsigned short *
__c) {
14231 vector
bool short *
__c) {
14238 vector pixel *
__c) {
14258 unsigned int *
__c) {
14264 vector
unsigned int *
__c) {
14271 vector
bool int *
__c) {
14278 vector
float *
__c) {
14287 signed char *
__c) {
14293 vector
signed char *
__c) {
14300 int __b,
unsigned char *
__c) {
14307 vector
unsigned char *
__c) {
14314 vector
bool char *
__c) {
14327 vector
short *
__c) {
14334 int __b,
unsigned short *
__c) {
14341 vector
unsigned short *
__c) {
14348 vector
bool short *
__c) {
14355 vector pixel *
__c) {
14375 unsigned int *
__c) {
14381 vector
unsigned int *
__c) {
14388 vector
bool int *
__c) {
14395 vector
float *
__c) {
14404 signed char *
__c) {
14410 vector
signed char *
__c) {
14417 unsigned char *
__c) {
14423 vector
unsigned char *
__c) {
14430 vector
bool char *
__c) {
14443 vector
short *
__c) {
14450 int __b,
unsigned short *
__c) {
14457 vector
unsigned short *
__c) {
14464 vector
bool short *
__c) {
14471 vector pixel *
__c) {
14491 unsigned int *
__c) {
14497 vector
unsigned int *
__c) {
14504 vector
bool int *
__c) {
14511 vector
float *
__c) {
14520 signed char *
__c) {
14526 vector
signed char *
__c) {
14533 int __b,
unsigned char *
__c) {
14540 vector
unsigned char *
__c) {
14547 vector
bool char *
__c) {
14560 vector
short *
__c) {
14567 int __b,
unsigned short *
__c) {
14574 vector
unsigned short *
__c) {
14581 vector
bool short *
__c) {
14588 vector pixel *
__c) {
14608 unsigned int *
__c) {
14614 vector
unsigned int *
__c) {
14621 vector
bool int *
__c) {
14628 vector
float *
__c) {
14638 vector
signed char __res = (vector
signed char)(0);
14645 vector
unsigned char __res = (vector
unsigned char)(0);
14651 vector
short __res = (vector short)(0);
14658 vector
unsigned short __res = (vector
unsigned short)(0);
14664 vector
int __res = (vector
int)(0);
14671 vector
unsigned int __res = (vector
unsigned int)(0);
14677 vector
float __res = (vector
float)(0);
14684 vector
double __res = (vector
double)(0);
14691 vector
signed long long __res = (vector
signed long long)(0);
14696static __inline__ vector
unsigned long long __ATTRS_o_ai
14698 vector
unsigned long long __res = (vector
unsigned long long)(0);
14707 return (vector
signed char)(
__a);
14712 return (vector
unsigned char)(
__a);
14716 return (vector
short)(
__a);
14721 return (vector
unsigned short)(
__a);
14725 return (vector
int)(
__a);
14730 return (vector
unsigned int)(
__a);
14736 return (vector
signed long long)(
__a);
14739static __inline__ vector
unsigned long long __ATTRS_o_ai
14741 return (vector
unsigned long long)(
__a);
14744#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
14745 defined(__SIZEOF_INT128__)
14748 return (vector
signed __int128)(
__a);
14751static __inline__ vector
unsigned __int128
__ATTRS_o_ai
14753 return (vector
unsigned __int128)(
__a);
14759 return (vector
double)(
__a);
14764 return (vector
float)(
__a);
14772 vector
signed char __b) {
14773 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14778 vector
bool char __b) {
14779 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14784 vector
unsigned char __b) {
14785 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14790 vector
bool char __b) {
14791 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14796 vector
signed char __b) {
14797 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14802 vector
unsigned char __b) {
14803 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14808 vector
bool char __b) {
14809 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14814 vector
short __b) {
14819 vector
bool short __b) {
14820 return __builtin_altivec_vcmpequh_p(
__CR6_LT,
__a, (vector
short)
__b);
14824 vector
unsigned short __b) {
14825 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14826 (vector
short)
__b);
14830 vector
bool short __b) {
14831 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14832 (vector
short)
__b);
14836 vector
short __b) {
14837 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14838 (vector
short)
__b);
14842 vector
unsigned short __b) {
14843 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14844 (vector
short)
__b);
14848 vector
bool short __b) {
14849 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14850 (vector
short)
__b);
14854 vector pixel
__b) {
14855 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14856 (vector
short)
__b);
14864 vector
bool int __b) {
14865 return __builtin_altivec_vcmpequw_p(
__CR6_LT,
__a, (vector
int)
__b);
14869 vector
unsigned int __b) {
14870 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14875 vector
bool int __b) {
14876 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14882 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14887 vector
unsigned int __b) {
14888 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14893 vector
bool int __b) {
14894 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14900 vector
signed long long __b) {
14901#ifdef __POWER8_VECTOR__
14911 vector
bool long long __b) {
14912 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14916 vector
unsigned long long __b) {
14917 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14921 vector
bool long long __b) {
14922 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14926 vector
long long __b) {
14927 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14931 vector
unsigned long long __b) {
14932 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14936 vector
bool long long __b) {
14937 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14942 vector
float __b) {
14952 vector
double __b) {
14957#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
14959 vector
signed __int128
__b) {
14960 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
14961 (vector
signed __int128)
__b);
14965 vector
unsigned __int128
__b) {
14966 return __builtin_altivec_vcmpequq_p(
__CR6_LT,
__a,
14967 (vector
signed __int128)
__b);
14971 vector
bool __int128
__b) {
14972 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
14973 (vector
signed __int128)
__b);
14980 vector
signed char __b) {
14985 vector
bool char __b) {
14986 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__b,
__a);
14990 vector
unsigned char __b) {
14995 vector
bool char __b) {
14996 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
__a);
15000 vector
signed char __b) {
15001 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__b, (vector
signed char)
__a);
15005 vector
unsigned char __b) {
15006 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__b, (vector
unsigned char)
__a);
15010 vector
bool char __b) {
15011 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
15012 (vector
unsigned char)
__a);
15016 vector
short __b) {
15021 vector
bool short __b) {
15022 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)
__b,
__a);
15026 vector
unsigned short __b) {
15031 vector
bool short __b) {
15032 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15037 vector
short __b) {
15038 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__b, (vector
signed short)
__a);
15042 vector
unsigned short __b) {
15043 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__b,
15044 (vector
unsigned short)
__a);
15048 vector
bool short __b) {
15049 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15050 (vector
unsigned short)
__a);
15058 vector
bool int __b) {
15059 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)
__b,
__a);
15063 vector
unsigned int __b) {
15068 vector
bool int __b) {
15069 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
__a);
15074 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__b, (vector
signed int)
__a);
15078 vector
unsigned int __b) {
15079 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__b, (vector
unsigned int)
__a);
15083 vector
bool int __b) {
15084 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
15085 (vector
unsigned int)
__a);
15090 vector
signed long long __b) {
15094 vector
bool long long __b) {
15095 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__b,
15100 vector
unsigned long long __b) {
15105 vector
bool long long __b) {
15106 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15111 vector
signed long long __b) {
15112 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__b,
15113 (vector
signed long long)
__a);
15117 vector
unsigned long long __b) {
15118 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__b,
15119 (vector
unsigned long long)
__a);
15123 vector
bool long long __b) {
15124 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15125 (vector
unsigned long long)
__a);
15130 vector
float __b) {
15140 vector
double __b) {
15145#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15147 vector
signed __int128
__b) {
15152 vector
unsigned __int128
__b) {
15160 vector
signed char __b) {
15165 vector
bool char __b) {
15166 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__a, (vector
signed char)
__b);
15170 vector
unsigned char __b) {
15175 vector
bool char __b) {
15176 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__a, (vector
unsigned char)
__b);
15180 vector
signed char __b) {
15181 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__a,
__b);
15185 vector
unsigned char __b) {
15186 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
__b);
15190 vector
bool char __b) {
15191 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
15192 (vector
unsigned char)
__b);
15196 vector
short __b) {
15201 vector
bool short __b) {
15202 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__a, (vector
short)
__b);
15206 vector
unsigned short __b) {
15211 vector
bool short __b) {
15212 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__a,
15213 (vector
unsigned short)
__b);
15217 vector
short __b) {
15218 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
signed short)
__a,
__b);
15222 vector
unsigned short __b) {
15223 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15228 vector
bool short __b) {
15229 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15230 (vector
unsigned short)
__b);
15238 vector
bool int __b) {
15239 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__a, (vector
int)
__b);
15243 vector
unsigned int __b) {
15248 vector
bool int __b) {
15249 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__a, (vector
unsigned int)
__b);
15254 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
signed int)
__a,
__b);
15258 vector
unsigned int __b) {
15259 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
__b);
15263 vector
bool int __b) {
15264 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
15265 (vector
unsigned int)
__b);
15270 vector
signed long long __b) {
15274 vector
bool long long __b) {
15275 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__a,
15276 (vector
signed long long)
__b);
15280 vector
unsigned long long __b) {
15285 vector
bool long long __b) {
15286 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__a,
15287 (vector
unsigned long long)
__b);
15291 vector
signed long long __b) {
15292 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__a,
15297 vector
unsigned long long __b) {
15298 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15303 vector
bool long long __b) {
15304 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15305 (vector
unsigned long long)
__b);
15310 vector
float __b) {
15320 vector
double __b) {
15325#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15327 vector
signed __int128
__b) {
15332 vector
unsigned __int128
__b) {
15340vec_all_in(vector
float __a, vector
float __b) {
15347 vector
signed char __b) {
15352 vector
bool char __b) {
15353 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__a, (vector
signed char)
__b);
15357 vector
unsigned char __b) {
15362 vector
bool char __b) {
15363 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__a, (vector
unsigned char)
__b);
15367 vector
signed char __b) {
15368 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__a,
__b);
15372 vector
unsigned char __b) {
15373 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
__b);
15377 vector
bool char __b) {
15378 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
15379 (vector
unsigned char)
__b);
15383 vector
short __b) {
15388 vector
bool short __b) {
15389 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15393 vector
unsigned short __b) {
15398 vector
bool short __b) {
15399 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__a,
15400 (vector
unsigned short)
__b);
15404 vector
short __b) {
15405 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
signed short)
__a,
__b);
15409 vector
unsigned short __b) {
15410 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15415 vector
bool short __b) {
15416 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15417 (vector
unsigned short)
__b);
15425 vector
bool int __b) {
15426 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15430 vector
unsigned int __b) {
15435 vector
bool int __b) {
15436 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__a, (vector
unsigned int)
__b);
15441 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
signed int)
__a,
__b);
15445 vector
unsigned int __b) {
15446 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
__b);
15450 vector
bool int __b) {
15451 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
15452 (vector
unsigned int)
__b);
15457 vector
signed long long __b) {
15462 vector
unsigned long long __b) {
15467 vector
bool long long __b) {
15468 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__a,
15469 (vector
signed long long)
__b);
15473 vector
bool long long __b) {
15474 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__a,
15475 (vector
unsigned long long)
__b);
15479 vector
signed long long __b) {
15480 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__a,
15485 vector
unsigned long long __b) {
15486 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15491 vector
bool long long __b) {
15492 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15493 (vector
unsigned long long)
__b);
15498 vector
float __b) {
15508 vector
double __b) {
15513#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15515 vector
signed __int128
__b) {
15520 vector
unsigned __int128
__b) {
15528 vector
signed char __b) {
15533 vector
bool char __b) {
15534 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__b,
__a);
15538 vector
unsigned char __b) {
15543 vector
bool char __b) {
15544 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
__a);
15548 vector
signed char __b) {
15549 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__b, (vector
signed char)
__a);
15553 vector
unsigned char __b) {
15554 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__b, (vector
unsigned char)
__a);
15558 vector
bool char __b) {
15559 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
15560 (vector
unsigned char)
__a);
15564 vector
short __b) {
15569 vector
bool short __b) {
15570 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)
__b,
__a);
15574 vector
unsigned short __b) {
15579 vector
bool short __b) {
15580 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15585 vector
short __b) {
15586 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__b, (vector
signed short)
__a);
15590 vector
unsigned short __b) {
15591 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__b,
15592 (vector
unsigned short)
__a);
15596 vector
bool short __b) {
15597 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15598 (vector
unsigned short)
__a);
15606 vector
bool int __b) {
15607 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)
__b,
__a);
15611 vector
unsigned int __b) {
15616 vector
bool int __b) {
15617 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
__a);
15622 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__b, (vector
signed int)
__a);
15626 vector
unsigned int __b) {
15627 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__b, (vector
unsigned int)
__a);
15631 vector
bool int __b) {
15632 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
15633 (vector
unsigned int)
__a);
15638 vector
signed long long __b) {
15643 vector
unsigned long long __b) {
15648 vector
bool long long __b) {
15649 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__b,
15654 vector
bool long long __b) {
15655 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15660 vector
signed long long __b) {
15661 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__b,
15662 (vector
signed long long)
__a);
15666 vector
unsigned long long __b) {
15667 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__b,
15668 (vector
unsigned long long)
__a);
15672 vector
bool long long __b) {
15673 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15674 (vector
unsigned long long)
__a);
15679 vector
float __b) {
15689 vector
double __b) {
15694#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15696 vector
signed __int128
__b) {
15701 vector
unsigned __int128
__b) {
15725 vector
signed char __b) {
15726 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15731 vector
bool char __b) {
15732 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15737 vector
unsigned char __b) {
15738 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15743 vector
bool char __b) {
15744 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15749 vector
signed char __b) {
15750 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15755 vector
unsigned char __b) {
15756 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15761 vector
bool char __b) {
15762 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15767 vector
short __b) {
15772 vector
bool short __b) {
15773 return __builtin_altivec_vcmpequh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15777 vector
unsigned short __b) {
15778 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15779 (vector
short)
__b);
15783 vector
bool short __b) {
15784 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15785 (vector
short)
__b);
15789 vector
short __b) {
15790 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15791 (vector
short)
__b);
15795 vector
unsigned short __b) {
15796 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15797 (vector
short)
__b);
15801 vector
bool short __b) {
15802 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15803 (vector
short)
__b);
15807 vector pixel
__b) {
15808 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15809 (vector
short)
__b);
15817 vector
bool int __b) {
15818 return __builtin_altivec_vcmpequw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15822 vector
unsigned int __b) {
15823 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15828 vector
bool int __b) {
15829 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15835 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15840 vector
unsigned int __b) {
15841 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15846 vector
bool int __b) {
15847 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15853 vector
signed long long __b) {
15858 vector
unsigned long long __b) {
15859 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)
__a,
15860 (vector
long long)
__b);
15864 vector
bool long long __b) {
15865 return __builtin_altivec_vcmpequd_p(
__CR6_EQ,
__a,
15866 (vector
signed long long)
__b);
15870 vector
bool long long __b) {
15871 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15872 (vector
signed long long)
__b);
15876 vector
signed long long __b) {
15877 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15878 (vector
signed long long)
__b);
15882 vector
unsigned long long __b) {
15883 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15884 (vector
signed long long)
__b);
15888 vector
bool long long __b) {
15889 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15890 (vector
signed long long)
__b);
15895 vector
float __b) {
15905 vector
double __b) {
15910#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15912 vector
signed __int128
__b) {
15913 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15918 vector
unsigned __int128
__b) {
15919 return __builtin_altivec_vcmpequq_p(
__CR6_EQ,
__a,
15920 (vector
signed __int128)
__b);
15924 vector
bool __int128
__b) {
15925 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15926 (vector
signed __int128)
__b);
15933 vector
float __b) {
15943 vector
double __b) {
15951 vector
float __b) {
15961 vector
double __b) {
15979 vector
double __b) {
15997 vector
double __b) {
16022 vector
signed char __b) {
16028 vector
bool char __b) {
16034 vector
unsigned char __b) {
16040 vector
bool char __b) {
16046 vector
signed char __b) {
16052 vector
unsigned char __b) {
16058 vector
bool char __b) {
16064 vector
short __b) {
16069 vector
bool short __b) {
16074 vector
unsigned short __b) {
16076 (vector
short)
__b);
16080 vector
bool short __b) {
16082 (vector
short)
__b);
16086 vector
short __b) {
16088 (vector
short)
__b);
16092 vector
unsigned short __b) {
16094 (vector
short)
__b);
16098 vector
bool short __b) {
16100 (vector
short)
__b);
16104 vector pixel
__b) {
16106 (vector
short)
__b);
16114 vector
bool int __b) {
16119 vector
unsigned int __b) {
16125 vector
bool int __b) {
16137 vector
unsigned int __b) {
16143 vector
bool int __b) {
16150 vector
signed long long __b) {
16155 vector
unsigned long long __b) {
16156 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)
__a,
16157 (vector
long long)
__b);
16161 vector
bool long long __b) {
16163 (vector
signed long long)
__b);
16167 vector
bool long long __b) {
16168 return __builtin_altivec_vcmpequd_p(
16173 vector
signed long long __b) {
16174 return __builtin_altivec_vcmpequd_p(
16179 vector
unsigned long long __b) {
16180 return __builtin_altivec_vcmpequd_p(
16185 vector
bool long long __b) {
16186 return __builtin_altivec_vcmpequd_p(
16192 vector
float __b) {
16202 vector
double __b) {
16207#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16209 vector
signed __int128
__b) {
16211 (vector
unsigned __int128)
__a,
__b);
16215 vector
unsigned __int128
__b) {
16217 (vector
signed __int128)
__b);
16221 vector
bool __int128
__b) {
16222 return __builtin_altivec_vcmpequq_p(
16230 vector
signed char __b) {
16235 vector
bool char __b) {
16236 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__b,
16241 vector
unsigned char __b) {
16246 vector
bool char __b) {
16247 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16252 vector
signed char __b) {
16254 (vector
signed char)
__a);
16258 vector
unsigned char __b) {
16260 (vector
unsigned char)
__a);
16264 vector
bool char __b) {
16265 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16266 (vector
unsigned char)
__a);
16270 vector
short __b) {
16275 vector
bool short __b) {
16280 vector
unsigned short __b) {
16285 vector
bool short __b) {
16286 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16291 vector
short __b) {
16293 (vector
signed short)
__a);
16297 vector
unsigned short __b) {
16299 (vector
unsigned short)
__a);
16303 vector
bool short __b) {
16304 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16305 (vector
unsigned short)
__a);
16313 vector
bool int __b) {
16318 vector
unsigned int __b) {
16323 vector
bool int __b) {
16324 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16331 (vector
signed int)
__a);
16335 vector
unsigned int __b) {
16337 (vector
unsigned int)
__a);
16341 vector
bool int __b) {
16342 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16343 (vector
unsigned int)
__a);
16348 vector
signed long long __b) {
16353 vector
unsigned long long __b) {
16358 vector
bool long long __b) {
16360 (vector
signed long long)
__b,
__a);
16364 vector
bool long long __b) {
16366 (vector
unsigned long long)
__b,
__a);
16370 vector
signed long long __b) {
16372 (vector
signed long long)
__a);
16376 vector
unsigned long long __b) {
16378 (vector
unsigned long long)
__a);
16382 vector
bool long long __b) {
16384 (vector
unsigned long long)
__b,
16385 (vector
unsigned long long)
__a);
16390 vector
float __b) {
16400 vector
double __b) {
16405#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16407 vector
signed __int128
__b) {
16412 vector
unsigned __int128
__b) {
16420 vector
signed char __b) {
16425 vector
bool char __b) {
16427 (vector
signed char)
__b);
16431 vector
unsigned char __b) {
16436 vector
bool char __b) {
16438 (vector
unsigned char)
__b);
16442 vector
signed char __b) {
16443 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__a,
16448 vector
unsigned char __b) {
16449 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16454 vector
bool char __b) {
16455 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16456 (vector
unsigned char)
__b);
16460 vector
short __b) {
16465 vector
bool short __b) {
16470 vector
unsigned short __b) {
16475 vector
bool short __b) {
16477 (vector
unsigned short)
__b);
16481 vector
short __b) {
16482 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
signed short)
__a,
16487 vector
unsigned short __b) {
16488 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16493 vector
bool short __b) {
16494 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16495 (vector
unsigned short)
__b);
16503 vector
bool int __b) {
16508 vector
unsigned int __b) {
16513 vector
bool int __b) {
16515 (vector
unsigned int)
__b);
16520 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
signed int)
__a,
16525 vector
unsigned int __b) {
16526 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16531 vector
bool int __b) {
16532 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16533 (vector
unsigned int)
__b);
16538 vector
signed long long __b) {
16543 vector
unsigned long long __b) {
16548 vector
bool long long __b) {
16550 (vector
signed long long)
__b);
16554 vector
bool long long __b) {
16556 (vector
unsigned long long)
__b);
16560 vector
signed long long __b) {
16562 (vector
signed long long)
__a,
__b);
16566 vector
unsigned long long __b) {
16568 (vector
unsigned long long)
__a,
__b);
16572 vector
bool long long __b) {
16574 (vector
unsigned long long)
__a,
16575 (vector
unsigned long long)
__b);
16580 vector
float __b) {
16590 vector
double __b) {
16595#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16597 vector
signed __int128
__b) {
16602 vector
unsigned __int128
__b) {
16610 vector
signed char __b) {
16615 vector
bool char __b) {
16617 (vector
signed char)
__b);
16621 vector
unsigned char __b) {
16626 vector
bool char __b) {
16628 (vector
unsigned char)
__b);
16632 vector
signed char __b) {
16633 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__a,
16638 vector
unsigned char __b) {
16639 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16644 vector
bool char __b) {
16645 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16646 (vector
unsigned char)
__b);
16650 vector
short __b) {
16655 vector
bool short __b) {
16660 vector
unsigned short __b) {
16665 vector
bool short __b) {
16667 (vector
unsigned short)
__b);
16671 vector
short __b) {
16672 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
signed short)
__a,
16677 vector
unsigned short __b) {
16678 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16683 vector
bool short __b) {
16684 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16685 (vector
unsigned short)
__b);
16693 vector
bool int __b) {
16698 vector
unsigned int __b) {
16703 vector
bool int __b) {
16705 (vector
unsigned int)
__b);
16710 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
signed int)
__a,
16715 vector
unsigned int __b) {
16716 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16721 vector
bool int __b) {
16722 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16723 (vector
unsigned int)
__b);
16728 vector
signed long long __b) {
16733 vector
unsigned long long __b) {
16738 vector
bool long long __b) {
16740 (vector
signed long long)
__b);
16744 vector
bool long long __b) {
16746 (vector
unsigned long long)
__b);
16750 vector
signed long long __b) {
16752 (vector
signed long long)
__a,
__b);
16756 vector
unsigned long long __b) {
16758 (vector
unsigned long long)
__a,
__b);
16762 vector
bool long long __b) {
16764 (vector
unsigned long long)
__a,
16765 (vector
unsigned long long)
__b);
16770 vector
float __b) {
16780 vector
double __b) {
16785#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16787 vector
signed __int128
__b) {
16792 vector
unsigned __int128
__b) {
16800 vector
signed char __b) {
16805 vector
bool char __b) {
16806 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__b,
16811 vector
unsigned char __b) {
16816 vector
bool char __b) {
16817 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16822 vector
signed char __b) {
16824 (vector
signed char)
__a);
16828 vector
unsigned char __b) {
16830 (vector
unsigned char)
__a);
16834 vector
bool char __b) {
16835 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16836 (vector
unsigned char)
__a);
16840 vector
short __b) {
16845 vector
bool short __b) {
16850 vector
unsigned short __b) {
16855 vector
bool short __b) {
16856 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16861 vector
short __b) {
16863 (vector
signed short)
__a);
16867 vector
unsigned short __b) {
16869 (vector
unsigned short)
__a);
16873 vector
bool short __b) {
16874 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16875 (vector
unsigned short)
__a);
16883 vector
bool int __b) {
16888 vector
unsigned int __b) {
16893 vector
bool int __b) {
16894 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16901 (vector
signed int)
__a);
16905 vector
unsigned int __b) {
16907 (vector
unsigned int)
__a);
16911 vector
bool int __b) {
16912 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16913 (vector
unsigned int)
__a);
16918 vector
signed long long __b) {
16923 vector
unsigned long long __b) {
16928 vector
bool long long __b) {
16930 (vector
signed long long)
__b,
__a);
16934 vector
bool long long __b) {
16936 (vector
unsigned long long)
__b,
__a);
16940 vector
signed long long __b) {
16942 (vector
signed long long)
__a);
16946 vector
unsigned long long __b) {
16948 (vector
unsigned long long)
__a);
16952 vector
bool long long __b) {
16954 (vector
unsigned long long)
__b,
16955 (vector
unsigned long long)
__a);
16960 vector
float __b) {
16970 vector
double __b) {
16975#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16977 vector
signed __int128
__b) {
16982 vector
unsigned __int128
__b) {
17005 vector
signed char __b) {
17011 vector
bool char __b) {
17017 vector
unsigned char __b) {
17023 vector
bool char __b) {
17029 vector
signed char __b) {
17035 vector
unsigned char __b) {
17041 vector
bool char __b) {
17047 vector
short __b) {
17052 vector
bool short __b) {
17057 vector
unsigned short __b) {
17059 (vector
short)
__b);
17063 vector
bool short __b) {
17065 (vector
short)
__b);
17069 vector
short __b) {
17071 (vector
short)
__b);
17075 vector
unsigned short __b) {
17077 (vector
short)
__b);
17081 vector
bool short __b) {
17083 (vector
short)
__b);
17087 vector pixel
__b) {
17089 (vector
short)
__b);
17097 vector
bool int __b) {
17102 vector
unsigned int __b) {
17108 vector
bool int __b) {
17120 vector
unsigned int __b) {
17126 vector
bool int __b) {
17133 vector
signed long long __b) {
17134#ifdef __POWER8_VECTOR__
17144 vector
unsigned long long __b) {
17145 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17149 vector
bool long long __b) {
17150 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17154 vector
bool long long __b) {
17155 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17159 vector
signed long long __b) {
17160 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17164 vector
unsigned long long __b) {
17165 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17169 vector
bool long long __b) {
17170 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17175 vector
float __b) {
17185 vector
double __b) {
17190#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17192 vector
signed __int128
__b) {
17194 (vector
unsigned __int128)
__a,
__b);
17198 vector
unsigned __int128
__b) {
17200 (vector
signed __int128)
__b);
17204 vector
bool __int128
__b) {
17205 return __builtin_altivec_vcmpequq_p(
17213 vector
float __b) {
17223 vector
double __b) {
17231 vector
float __b) {
17241 vector
double __b) {
17249 vector
float __b) {
17259 vector
double __b) {
17267 vector
float __b) {
17277 vector
double __b) {
17301vec_any_out(vector
float __a, vector
float __b) {
17319#define vec_sbox_be __builtin_altivec_crypto_vsbox
17320#define vec_cipher_be __builtin_altivec_crypto_vcipher
17321#define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast
17322#define vec_ncipher_be __builtin_altivec_crypto_vncipher
17323#define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
17326static __inline__ vector
unsigned long long __attribute__((__always_inline__))
17327__builtin_crypto_vsbox(vector
unsigned long long __a) {
17328 return __builtin_altivec_crypto_vsbox(
__a);
17331static __inline__ vector
unsigned long long __attribute__((__always_inline__))
17332__builtin_crypto_vcipher(vector
unsigned long long __a,
17333 vector
unsigned long long __b) {
17334 return __builtin_altivec_crypto_vcipher(
__a,
__b);
17337static __inline__ vector
unsigned long long __attribute__((__always_inline__))
17338__builtin_crypto_vcipherlast(vector
unsigned long long __a,
17339 vector
unsigned long long __b) {
17340 return __builtin_altivec_crypto_vcipherlast(
__a,
__b);
17343static __inline__ vector
unsigned long long __attribute__((__always_inline__))
17344__builtin_crypto_vncipher(vector
unsigned long long __a,
17345 vector
unsigned long long __b) {
17346 return __builtin_altivec_crypto_vncipher(
__a,
__b);
17349static __inline__ vector
unsigned long long __attribute__((__always_inline__))
17350__builtin_crypto_vncipherlast(vector
unsigned long long __a,
17351 vector
unsigned long long __b) {
17352 return __builtin_altivec_crypto_vncipherlast(
__a,
__b);
17356#define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
17357#define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
17359#define vec_shasigma_be(X, Y, Z) \
17360 _Generic((X), vector unsigned int \
17361 : __builtin_crypto_vshasigmaw, vector unsigned long long \
17362 : __builtin_crypto_vshasigmad)((X), (Y), (Z))
17365#ifdef __POWER8_VECTOR__
17367vec_permxor(vector
bool char __a, vector
bool char __b,
17368 vector
bool char __c) {
17369 return (vector
bool char)__builtin_altivec_crypto_vpermxor(
17370 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17371 (vector
unsigned char)
__c);
17375vec_permxor(vector
signed char __a, vector
signed char __b,
17376 vector
signed char __c) {
17377 return (vector
signed char)__builtin_altivec_crypto_vpermxor(
17378 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17379 (vector
unsigned char)
__c);
17383vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
17384 vector
unsigned char __c) {
17385 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17389__builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
17390 vector
unsigned char __c) {
17391 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17395__builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
17396 vector
unsigned short __c) {
17397 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
17398 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17399 (vector
unsigned char)
__c);
17402static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
17403 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
17404 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
17405 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17406 (vector
unsigned char)
__c);
17409static __inline__ vector
unsigned long long __ATTRS_o_ai
17410__builtin_crypto_vpermxor(vector
unsigned long long __a,
17411 vector
unsigned long long __b,
17412 vector
unsigned long long __c) {
17413 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
17414 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17415 (vector
unsigned char)
__c);
17419__builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
17420 return __builtin_altivec_crypto_vpmsumb(
__a,
__b);
17424__builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
17425 return __builtin_altivec_crypto_vpmsumh(
__a,
__b);
17429__builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
17430 return __builtin_altivec_crypto_vpmsumw(
__a,
__b);
17433static __inline__ vector
unsigned long long __ATTRS_o_ai
17434__builtin_crypto_vpmsumb(vector
unsigned long long __a,
17435 vector
unsigned long long __b) {
17436 return __builtin_altivec_crypto_vpmsumd(
__a,
__b);
17440vec_vgbbd(vector
signed char __a) {
17441 return (vector
signed char)__builtin_altivec_vgbbd((vector
unsigned char)
__a);
17444#define vec_pmsum_be __builtin_crypto_vpmsumb
17445#define vec_gb __builtin_altivec_vgbbd
17448vec_vgbbd(vector
unsigned char __a) {
17449 return __builtin_altivec_vgbbd(
__a);
17453vec_gbb(vector
signed long long __a) {
17454 return (vector
signed long long)__builtin_altivec_vgbbd(
17455 (vector
unsigned char)
__a);
17458static __inline__ vector
unsigned long long __ATTRS_o_ai
17459vec_gbb(vector
unsigned long long __a) {
17460 return (vector
unsigned long long)__builtin_altivec_vgbbd(
17461 (vector
unsigned char)
__a);
17465vec_vbpermq(vector
signed char __a, vector
signed char __b) {
17466 return (vector
long long)__builtin_altivec_vbpermq((vector
unsigned char)
__a,
17467 (vector
unsigned char)
__b);
17471vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
17472 return (vector
long long)__builtin_altivec_vbpermq(
__a,
__b);
17475#if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
17476static __inline__ vector
unsigned long long __ATTRS_o_ai
17477vec_bperm(vector
unsigned __int128
__a, vector
unsigned char __b) {
17478 return __builtin_altivec_vbpermq((vector
unsigned char)
__a,
17479 (vector
unsigned char)
__b);
17483vec_bperm(vector
unsigned char __a, vector
unsigned char __b) {
17484 return (vector
unsigned char)__builtin_altivec_vbpermq(
__a,
__b);
17487#ifdef __POWER9_VECTOR__
17488static __inline__ vector
unsigned long long __ATTRS_o_ai
17489vec_bperm(vector
unsigned long long __a, vector
unsigned char __b) {
17490 return __builtin_altivec_vbpermd(
__a,
__b);
17498 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17503 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17509 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17514 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17518 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17523 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17527 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17532 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17537 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17541 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17547 return __builtin_shufflevector(
__a,
__a, 1, 0);
17552 return __builtin_shufflevector(
__a,
__a, 1, 0);
17557 return __builtin_shufflevector(
__a,
__a, 1, 0);
17561 return __builtin_shufflevector(
__a,
__a, 1, 0);
17583 vector
unsigned char __indices =
17584 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17590 vector
unsigned char __indices =
17591 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17597 vector
unsigned char __indices =
17598 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17604 vector
unsigned char __indices =
17605 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17611 vector
unsigned char __indices =
17612 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17618 vector
unsigned char __indices =
17619 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17625 vector
unsigned char __indices =
17626 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17633 vector
unsigned char __indices =
17634 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17640 vector
unsigned char __indices =
17641 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17645static __inline__ vector
unsigned long long __ATTRS_o_ai
17647 vector
unsigned char __indices =
17648 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17654 vector
unsigned char __indices =
17655 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17660#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17661 defined(__SIZEOF_INT128__)
17664 vector
unsigned char __indices =
17665 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17666 return (vector
signed __int128)
vec_perm((vector
signed int)
__a,
17667 (vector
signed int)
__a,
17671static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17673 vector
unsigned char __indices =
17674 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17675 return (vector
unsigned __int128)
vec_perm((vector
signed int)
__a,
17676 (vector
signed int)
__a,
17683#define vec_xld2 vec_xl
17684#define vec_xlw4 vec_xl
17686typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
17687typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
17688typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
17689typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
17690typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
17691typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
17694 const signed char *__ptr) {
17695 return *(unaligned_vec_schar *)(__ptr + __offset);
17700 return *(unaligned_vec_uchar*)(__ptr + __offset);
17705 signed char *__addr = (
signed char *)__ptr + __offset;
17706 return *(unaligned_vec_sshort *)__addr;
17711 signed char *__addr = (
signed char *)__ptr + __offset;
17712 return *(unaligned_vec_ushort *)__addr;
17716 const signed int *__ptr) {
17717 signed char *__addr = (
signed char *)__ptr + __offset;
17718 return *(unaligned_vec_sint *)__addr;
17723 signed char *__addr = (
signed char *)__ptr + __offset;
17724 return *(unaligned_vec_uint *)__addr;
17728 const float *__ptr) {
17729 signed char *__addr = (
signed char *)__ptr + __offset;
17730 return *(unaligned_vec_float *)__addr;
17734typedef vector
signed long long unaligned_vec_sll
__attribute__((aligned(1)));
17735typedef vector
unsigned long long unaligned_vec_ull
__attribute__((aligned(1)));
17736typedef vector
double unaligned_vec_double
__attribute__((aligned(1)));
17740 signed char *__addr = (
signed char *)__ptr + __offset;
17741 return *(unaligned_vec_sll *)__addr;
17746 signed char *__addr = (
signed char *)__ptr + __offset;
17747 return *(unaligned_vec_ull *)__addr;
17751 const double *__ptr) {
17752 signed char *__addr = (
signed char *)__ptr + __offset;
17753 return *(unaligned_vec_double *)__addr;
17757#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17758 defined(__SIZEOF_INT128__)
17759typedef vector
signed __int128 unaligned_vec_si128
__attribute__((aligned(1)));
17760typedef vector
unsigned __int128 unaligned_vec_ui128
17764 signed char *__addr = (
signed char *)__ptr + __offset;
17765 return *(unaligned_vec_si128 *)__addr;
17770 signed char *__addr = (
signed char *)__ptr + __offset;
17771 return *(unaligned_vec_ui128 *)__addr;
17777#ifdef __LITTLE_ENDIAN__
17780 vector
signed char __vec = (vector
signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17781 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17782 13, 12, 11, 10, 9, 8);
17787 vector
unsigned char __vec = (vector
unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17788 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17789 13, 12, 11, 10, 9, 8);
17794 vector
signed short __vec = (vector
signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17795 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17800 vector
unsigned short __vec = (vector
unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17801 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17805vec_xl_be(
signed long long __offset,
const signed int *__ptr) {
17806 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17810vec_xl_be(
signed long long __offset,
const unsigned int *__ptr) {
17811 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17815vec_xl_be(
signed long long __offset,
const float *__ptr) {
17816 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17821vec_xl_be(
signed long long __offset,
const signed long long *__ptr) {
17822 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17825static __inline__ vector
unsigned long long __ATTRS_o_ai
17826vec_xl_be(
signed long long __offset,
const unsigned long long *__ptr) {
17827 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17831vec_xl_be(
signed long long __offset,
const double *__ptr) {
17832 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17836#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17837 defined(__SIZEOF_INT128__)
17839vec_xl_be(
signed long long __offset,
const signed __int128 *__ptr) {
17840 return vec_xl(__offset, __ptr);
17843static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17844vec_xl_be(
signed long long __offset,
const unsigned __int128 *__ptr) {
17845 return vec_xl(__offset, __ptr);
17849 #define vec_xl_be vec_xl
17852#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17853 defined(__SIZEOF_INT128__)
17858vec_xl_sext(
ptrdiff_t __offset,
const signed char *__pointer) {
17859 return (vector
signed __int128)*(__pointer + __offset);
17863vec_xl_sext(
ptrdiff_t __offset,
const signed short *__pointer) {
17864 return (vector
signed __int128)*(__pointer + __offset);
17868vec_xl_sext(
ptrdiff_t __offset,
const signed int *__pointer) {
17869 return (vector
signed __int128)*(__pointer + __offset);
17873vec_xl_sext(
ptrdiff_t __offset,
const signed long long *__pointer) {
17874 return (vector
signed __int128)*(__pointer + __offset);
17879static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17880vec_xl_zext(
ptrdiff_t __offset,
const unsigned char *__pointer) {
17881 return (vector
unsigned __int128)*(__pointer + __offset);
17884static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17885vec_xl_zext(
ptrdiff_t __offset,
const unsigned short *__pointer) {
17886 return (vector
unsigned __int128)*(__pointer + __offset);
17889static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17890vec_xl_zext(
ptrdiff_t __offset,
const unsigned int *__pointer) {
17891 return (vector
unsigned __int128)*(__pointer + __offset);
17894static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17895vec_xl_zext(
ptrdiff_t __offset,
const unsigned long long *__pointer) {
17896 return (vector
unsigned __int128)*(__pointer + __offset);
17904vec_xlds(
ptrdiff_t __offset,
const signed long long *__ptr) {
17905 signed long long *__addr = (
signed long long*)((
signed char *)__ptr + __offset);
17906 return (vector
signed long long) *__addr;
17909static __inline__ vector
unsigned long long __ATTRS_o_ai
17910vec_xlds(
ptrdiff_t __offset,
const unsigned long long *__ptr) {
17911 unsigned long long *__addr = (
unsigned long long *)((
signed char *)__ptr + __offset);
17912 return (unaligned_vec_ull) *__addr;
17916 const double *__ptr) {
17917 double *__addr = (
double*)((
signed char *)__ptr + __offset);
17918 return (unaligned_vec_double) *__addr;
17923vec_load_splats(
signed long long __offset,
const signed int *__ptr) {
17924 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17925 return (vector
signed int)*__addr;
17929vec_load_splats(
unsigned long long __offset,
const signed int *__ptr) {
17930 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17931 return (vector
signed int)*__addr;
17935vec_load_splats(
signed long long __offset,
const unsigned int *__ptr) {
17936 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17937 return (vector
unsigned int)*__addr;
17941vec_load_splats(
unsigned long long __offset,
const unsigned int *__ptr) {
17942 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17943 return (vector
unsigned int)*__addr;
17947vec_load_splats(
signed long long __offset,
const float *__ptr) {
17948 float *__addr = (
float*)((
signed char *)__ptr + __offset);
17949 return (vector
float)*__addr;
17953vec_load_splats(
unsigned long long __offset,
const float *__ptr) {
17954 float *__addr = (
float*)((
signed char *)__ptr + __offset);
17955 return (vector
float)*__addr;
17961#define vec_xstd2 vec_xst
17962#define vec_xstw4 vec_xst
17965 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
17970 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
17975 signed char *__addr = (
signed char *)__ptr + __offset;
17976 *(unaligned_vec_sshort *)__addr = __vec;
17981 unsigned short *__ptr) {
17982 signed char *__addr = (
signed char *)__ptr + __offset;
17983 *(unaligned_vec_ushort *)__addr = __vec;
17987 ptrdiff_t __offset,
signed int *__ptr) {
17988 signed char *__addr = (
signed char *)__ptr + __offset;
17989 *(unaligned_vec_sint *)__addr = __vec;
17994 signed char *__addr = (
signed char *)__ptr + __offset;
17995 *(unaligned_vec_uint *)__addr = __vec;
18000 signed char *__addr = (
signed char *)__ptr + __offset;
18001 *(unaligned_vec_float *)__addr = __vec;
18007 signed long long *__ptr) {
18008 signed char *__addr = (
signed char *)__ptr + __offset;
18009 *(unaligned_vec_sll *)__addr = __vec;
18014 unsigned long long *__ptr) {
18015 signed char *__addr = (
signed char *)__ptr + __offset;
18016 *(unaligned_vec_ull *)__addr = __vec;
18021 signed char *__addr = (
signed char *)__ptr + __offset;
18022 *(unaligned_vec_double *)__addr = __vec;
18026#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18027 defined(__SIZEOF_INT128__)
18030 signed __int128 *__ptr) {
18031 signed char *__addr = (
signed char *)__ptr + __offset;
18032 *(unaligned_vec_si128 *)__addr = __vec;
18037 unsigned __int128 *__ptr) {
18038 signed char *__addr = (
signed char *)__ptr + __offset;
18039 *(unaligned_vec_ui128 *)__addr = __vec;
18045#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
18046 defined(__SIZEOF_INT128__)
18047static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18049 signed char *__ptr) {
18050 *(__ptr + __offset) = (
signed char)__vec[0];
18053static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18055 unsigned char *__ptr) {
18056 *(__ptr + __offset) = (
unsigned char)__vec[0];
18059static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18061 signed short *__ptr) {
18062 *(__ptr + __offset) = (
signed short)__vec[0];
18065static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18067 unsigned short *__ptr) {
18068 *(__ptr + __offset) = (
unsigned short)__vec[0];
18071static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18073 signed int *__ptr) {
18074 *(__ptr + __offset) = (
signed int)__vec[0];
18077static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18079 unsigned int *__ptr) {
18080 *(__ptr + __offset) = (
unsigned int)__vec[0];
18083static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18085 signed long long *__ptr) {
18086 *(__ptr + __offset) = (
signed long long)__vec[0];
18089static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18091 unsigned long long *__ptr) {
18092 *(__ptr + __offset) = (
unsigned long long)__vec[0];
18098#ifdef __LITTLE_ENDIAN__
18100 signed long long __offset,
18101 signed char *__ptr) {
18102 vector
signed char __tmp =
18103 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18104 13, 12, 11, 10, 9, 8);
18105 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18106 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18110 signed long long __offset,
18111 unsigned char *__ptr) {
18112 vector
unsigned char __tmp =
18113 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18114 13, 12, 11, 10, 9, 8);
18115 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18116 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18120 signed long long __offset,
18121 signed short *__ptr) {
18122 vector
signed short __tmp =
18123 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18124 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18125 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18129 signed long long __offset,
18130 unsigned short *__ptr) {
18131 vector
unsigned short __tmp =
18132 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18133 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18134 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18138 signed long long __offset,
18139 signed int *__ptr) {
18140 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
18144 signed long long __offset,
18145 unsigned int *__ptr) {
18146 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18150 signed long long __offset,
18152 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18157 signed long long __offset,
18158 signed long long *__ptr) {
18159 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18163 signed long long __offset,
18164 unsigned long long *__ptr) {
18165 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18169 signed long long __offset,
18171 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18175#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18176 defined(__SIZEOF_INT128__)
18178 signed long long __offset,
18179 signed __int128 *__ptr) {
18180 vec_xst(__vec, __offset, __ptr);
18184 signed long long __offset,
18185 unsigned __int128 *__ptr) {
18186 vec_xst(__vec, __offset, __ptr);
18190 #define vec_xst_be vec_xst
18193#ifdef __POWER9_VECTOR__
18194#define vec_test_data_class(__a, __b) \
18196 (__a), vector float \
18197 : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \
18199 : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \
18244#ifdef __POWER8_VECTOR__
18246 return __builtin_altivec_vminsd(
__a, -
__a);
18251 return __builtin_altivec_vminsw(
__a, -
__a);
18255 return __builtin_altivec_vminsh(
__a, -
__a);
18259 return __builtin_altivec_vminsb(
__a, -
__a);
18263 vector
float __b) {
18264 return __builtin_ppc_recipdivf(
__a,
__b);
18269 vector
double __b) {
18270 return __builtin_ppc_recipdivd(
__a,
__b);
18274#ifdef __POWER10_VECTOR__
18279vec_extractm(vector
unsigned char __a) {
18280 return __builtin_altivec_vextractbm(
__a);
18284vec_extractm(vector
unsigned short __a) {
18285 return __builtin_altivec_vextracthm(
__a);
18289vec_extractm(vector
unsigned int __a) {
18290 return __builtin_altivec_vextractwm(
__a);
18294vec_extractm(vector
unsigned long long __a) {
18295 return __builtin_altivec_vextractdm(
__a);
18298#ifdef __SIZEOF_INT128__
18300vec_extractm(vector
unsigned __int128
__a) {
18301 return __builtin_altivec_vextractqm(
__a);
18308vec_expandm(vector
unsigned char __a) {
18309 return __builtin_altivec_vexpandbm(
__a);
18313vec_expandm(vector
unsigned short __a) {
18314 return __builtin_altivec_vexpandhm(
__a);
18318vec_expandm(vector
unsigned int __a) {
18319 return __builtin_altivec_vexpandwm(
__a);
18322static __inline__ vector
unsigned long long __ATTRS_o_ai
18323vec_expandm(vector
unsigned long long __a) {
18324 return __builtin_altivec_vexpanddm(
__a);
18327#ifdef __SIZEOF_INT128__
18328static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18329vec_expandm(vector
unsigned __int128
__a) {
18330 return __builtin_altivec_vexpandqm(
__a);
18336#define vec_cntm(__a, __mp) \
18337 _Generic((__a), vector unsigned char \
18338 : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18339 (unsigned char)(__mp)), \
18340 vector unsigned short \
18341 : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18342 (unsigned char)(__mp)), \
18343 vector unsigned int \
18344 : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18345 (unsigned char)(__mp)), \
18346 vector unsigned long long \
18347 : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18348 (unsigned char)(__mp)))
18353vec_genbm(
unsigned long long __bm) {
18354 return __builtin_altivec_mtvsrbm(__bm);
18358vec_genhm(
unsigned long long __bm) {
18359 return __builtin_altivec_mtvsrhm(__bm);
18363vec_genwm(
unsigned long long __bm) {
18364 return __builtin_altivec_mtvsrwm(__bm);
18367static __inline__ vector
unsigned long long __ATTRS_o_ai
18368vec_gendm(
unsigned long long __bm) {
18369 return __builtin_altivec_mtvsrdm(__bm);
18372#ifdef __SIZEOF_INT128__
18373static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18374vec_genqm(
unsigned long long __bm) {
18375 return __builtin_altivec_mtvsrqm(__bm);
18381static __inline__ vector
unsigned long long __ATTRS_o_ai
18382vec_pdep(vector
unsigned long long __a, vector
unsigned long long __b) {
18383 return __builtin_altivec_vpdepd(
__a,
__b);
18388static __inline__ vector
unsigned long long __ATTRS_o_ai
18389vec_pext(vector
unsigned long long __a, vector
unsigned long long __b) {
18390 return __builtin_altivec_vpextd(
__a,
__b);
18395static __inline__ vector
unsigned long long __ATTRS_o_ai
18396vec_cfuge(vector
unsigned long long __a, vector
unsigned long long __b) {
18397 return __builtin_altivec_vcfuged(
__a,
__b);
18402#define vec_gnb(__a, __b) __builtin_altivec_vgnb(__a, __b)
18406#ifdef __SIZEOF_INT128__
18407#define vec_ternarylogic(__a, __b, __c, __imm) \
18408 _Generic((__a), vector unsigned char \
18409 : (vector unsigned char)__builtin_vsx_xxeval( \
18410 (vector unsigned long long)(__a), \
18411 (vector unsigned long long)(__b), \
18412 (vector unsigned long long)(__c), (__imm)), \
18413 vector unsigned short \
18414 : (vector unsigned short)__builtin_vsx_xxeval( \
18415 (vector unsigned long long)(__a), \
18416 (vector unsigned long long)(__b), \
18417 (vector unsigned long long)(__c), (__imm)), \
18418 vector unsigned int \
18419 : (vector unsigned int)__builtin_vsx_xxeval( \
18420 (vector unsigned long long)(__a), \
18421 (vector unsigned long long)(__b), \
18422 (vector unsigned long long)(__c), (__imm)), \
18423 vector unsigned long long \
18424 : (vector unsigned long long)__builtin_vsx_xxeval( \
18425 (vector unsigned long long)(__a), \
18426 (vector unsigned long long)(__b), \
18427 (vector unsigned long long)(__c), (__imm)), \
18428 vector unsigned __int128 \
18429 : (vector unsigned __int128)__builtin_vsx_xxeval( \
18430 (vector unsigned long long)(__a), \
18431 (vector unsigned long long)(__b), \
18432 (vector unsigned long long)(__c), (__imm)))
18434#define vec_ternarylogic(__a, __b, __c, __imm) \
18435 _Generic((__a), vector unsigned char \
18436 : (vector unsigned char)__builtin_vsx_xxeval( \
18437 (vector unsigned long long)(__a), \
18438 (vector unsigned long long)(__b), \
18439 (vector unsigned long long)(__c), (__imm)), \
18440 vector unsigned short \
18441 : (vector unsigned short)__builtin_vsx_xxeval( \
18442 (vector unsigned long long)(__a), \
18443 (vector unsigned long long)(__b), \
18444 (vector unsigned long long)(__c), (__imm)), \
18445 vector unsigned int \
18446 : (vector unsigned int)__builtin_vsx_xxeval( \
18447 (vector unsigned long long)(__a), \
18448 (vector unsigned long long)(__b), \
18449 (vector unsigned long long)(__c), (__imm)), \
18450 vector unsigned long long \
18451 : (vector unsigned long long)__builtin_vsx_xxeval( \
18452 (vector unsigned long long)(__a), \
18453 (vector unsigned long long)(__b), \
18454 (vector unsigned long long)(__c), (__imm)))
18461#define vec_genpcvm(__a, __imm) \
18463 (__a), vector unsigned char \
18464 : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18465 vector unsigned short \
18466 : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18467 vector unsigned int \
18468 : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18469 vector unsigned long long \
18470 : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18477vec_clr_first(vector
signed char __a,
unsigned int __n) {
18478#ifdef __LITTLE_ENDIAN__
18479 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18482 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18488vec_clr_first(vector
unsigned char __a,
unsigned int __n) {
18489#ifdef __LITTLE_ENDIAN__
18490 return (vector
unsigned char)__builtin_altivec_vclrrb(
18491 (vector
unsigned char)
__a, __n);
18493 return (vector
unsigned char)__builtin_altivec_vclrlb(
18494 (vector
unsigned char)
__a, __n);
18501vec_clr_last(vector
signed char __a,
unsigned int __n) {
18502#ifdef __LITTLE_ENDIAN__
18503 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18506 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18512vec_clr_last(vector
unsigned char __a,
unsigned int __n) {
18513#ifdef __LITTLE_ENDIAN__
18514 return (vector
unsigned char)__builtin_altivec_vclrlb(
18515 (vector
unsigned char)
__a, __n);
18517 return (vector
unsigned char)__builtin_altivec_vclrrb(
18518 (vector
unsigned char)
__a, __n);
18524static __inline__ vector
unsigned long long __ATTRS_o_ai
18525vec_cntlzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18526 return __builtin_altivec_vclzdm(
__a,
__b);
18531static __inline__ vector
unsigned long long __ATTRS_o_ai
18532vec_cnttzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18533 return __builtin_altivec_vctzdm(
__a,
__b);
18539vec_mod(vector
signed int __a, vector
signed int __b) {
18544vec_mod(vector
unsigned int __a, vector
unsigned int __b) {
18549vec_mod(vector
signed long long __a, vector
signed long long __b) {
18553static __inline__ vector
unsigned long long __ATTRS_o_ai
18554vec_mod(vector
unsigned long long __a, vector
unsigned long long __b) {
18558#ifdef __SIZEOF_INT128__
18560vec_mod(vector
signed __int128
__a, vector
signed __int128
__b) {
18564static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18565vec_mod(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
18571#define vec_sldb(__a, __b, __c) \
18573 (__a), vector unsigned char \
18574 : (vector unsigned char)__builtin_altivec_vsldbi( \
18575 (vector unsigned char)__a, (vector unsigned char)__b, \
18577 vector signed char \
18578 : (vector signed char)__builtin_altivec_vsldbi( \
18579 (vector unsigned char)__a, (vector unsigned char)__b, \
18581 vector unsigned short \
18582 : (vector unsigned short)__builtin_altivec_vsldbi( \
18583 (vector unsigned char)__a, (vector unsigned char)__b, \
18585 vector signed short \
18586 : (vector signed short)__builtin_altivec_vsldbi( \
18587 (vector unsigned char)__a, (vector unsigned char)__b, \
18589 vector unsigned int \
18590 : (vector unsigned int)__builtin_altivec_vsldbi( \
18591 (vector unsigned char)__a, (vector unsigned char)__b, \
18593 vector signed int \
18594 : (vector signed int)__builtin_altivec_vsldbi((vector unsigned char)__a, \
18595 (vector unsigned char)__b, \
18597 vector unsigned long long \
18598 : (vector unsigned long long)__builtin_altivec_vsldbi( \
18599 (vector unsigned char)__a, (vector unsigned char)__b, \
18601 vector signed long long \
18602 : (vector signed long long)__builtin_altivec_vsldbi( \
18603 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18606#define vec_srdb(__a, __b, __c) \
18608 (__a), vector unsigned char \
18609 : (vector unsigned char)__builtin_altivec_vsrdbi( \
18610 (vector unsigned char)__a, (vector unsigned char)__b, \
18612 vector signed char \
18613 : (vector signed char)__builtin_altivec_vsrdbi( \
18614 (vector unsigned char)__a, (vector unsigned char)__b, \
18616 vector unsigned short \
18617 : (vector unsigned short)__builtin_altivec_vsrdbi( \
18618 (vector unsigned char)__a, (vector unsigned char)__b, \
18620 vector signed short \
18621 : (vector signed short)__builtin_altivec_vsrdbi( \
18622 (vector unsigned char)__a, (vector unsigned char)__b, \
18624 vector unsigned int \
18625 : (vector unsigned int)__builtin_altivec_vsrdbi( \
18626 (vector unsigned char)__a, (vector unsigned char)__b, \
18628 vector signed int \
18629 : (vector signed int)__builtin_altivec_vsrdbi((vector unsigned char)__a, \
18630 (vector unsigned char)__b, \
18632 vector unsigned long long \
18633 : (vector unsigned long long)__builtin_altivec_vsrdbi( \
18634 (vector unsigned char)__a, (vector unsigned char)__b, \
18636 vector signed long long \
18637 : (vector signed long long)__builtin_altivec_vsrdbi( \
18638 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18643vec_insertl(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18644#ifdef __LITTLE_ENDIAN__
18645 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18647 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18652vec_insertl(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18653#ifdef __LITTLE_ENDIAN__
18654 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18656 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18661vec_insertl(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18662#ifdef __LITTLE_ENDIAN__
18663 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18665 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18669static __inline__ vector
unsigned long long __ATTRS_o_ai
18670vec_insertl(
unsigned long long __a, vector
unsigned long long __b,
18671 unsigned int __c) {
18672#ifdef __LITTLE_ENDIAN__
18673 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18675 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18680vec_insertl(vector
unsigned char __a, vector
unsigned char __b,
18681 unsigned int __c) {
18682#ifdef __LITTLE_ENDIAN__
18683 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18685 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18690vec_insertl(vector
unsigned short __a, vector
unsigned short __b,
18691 unsigned int __c) {
18692#ifdef __LITTLE_ENDIAN__
18693 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18695 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18700vec_insertl(vector
unsigned int __a, vector
unsigned int __b,
18701 unsigned int __c) {
18702#ifdef __LITTLE_ENDIAN__
18703 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18705 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18712vec_inserth(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18713#ifdef __LITTLE_ENDIAN__
18714 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18716 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18721vec_inserth(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18722#ifdef __LITTLE_ENDIAN__
18723 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18725 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18730vec_inserth(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18731#ifdef __LITTLE_ENDIAN__
18732 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18734 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18738static __inline__ vector
unsigned long long __ATTRS_o_ai
18739vec_inserth(
unsigned long long __a, vector
unsigned long long __b,
18740 unsigned int __c) {
18741#ifdef __LITTLE_ENDIAN__
18742 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18744 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18749vec_inserth(vector
unsigned char __a, vector
unsigned char __b,
18750 unsigned int __c) {
18751#ifdef __LITTLE_ENDIAN__
18752 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18754 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18759vec_inserth(vector
unsigned short __a, vector
unsigned short __b,
18760 unsigned int __c) {
18761#ifdef __LITTLE_ENDIAN__
18762 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18764 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18769vec_inserth(vector
unsigned int __a, vector
unsigned int __b,
18770 unsigned int __c) {
18771#ifdef __LITTLE_ENDIAN__
18772 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18774 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18780static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18781 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18782#ifdef __LITTLE_ENDIAN__
18783 return __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18785 vector
unsigned long long __ret = __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18786 return vec_sld(__ret, __ret, 8);
18790static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18791 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18792#ifdef __LITTLE_ENDIAN__
18793 return __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18795 vector
unsigned long long __ret = __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18796 return vec_sld(__ret, __ret, 8);
18800static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18801 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18802#ifdef __LITTLE_ENDIAN__
18803 return __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18805 vector
unsigned long long __ret = __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18806 return vec_sld(__ret, __ret, 8);
18810static __inline__ vector
unsigned long long __ATTRS_o_ai
18811vec_extractl(vector
unsigned long long __a, vector
unsigned long long __b,
18812 unsigned int __c) {
18813#ifdef __LITTLE_ENDIAN__
18814 return __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18816 vector
unsigned long long __ret = __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18817 return vec_sld(__ret, __ret, 8);
18823static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18824 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18825#ifdef __LITTLE_ENDIAN__
18826 return __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18828 vector
unsigned long long __ret = __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18829 return vec_sld(__ret, __ret, 8);
18833static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18834 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18835#ifdef __LITTLE_ENDIAN__
18836 return __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18838 vector
unsigned long long __ret = __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18839 return vec_sld(__ret, __ret, 8);
18843static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18844 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18845#ifdef __LITTLE_ENDIAN__
18846 return __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18848 vector
unsigned long long __ret = __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18849 return vec_sld(__ret, __ret, 8);
18853static __inline__ vector
unsigned long long __ATTRS_o_ai
18854vec_extracth(vector
unsigned long long __a, vector
unsigned long long __b,
18855 unsigned int __c) {
18856#ifdef __LITTLE_ENDIAN__
18857 return __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18859 vector
unsigned long long __ret = __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18860 return vec_sld(__ret, __ret, 8);
18867#define vec_permx(__a, __b, __c, __d) \
18869 (__a), vector unsigned char \
18870 : (vector unsigned char)__builtin_vsx_xxpermx( \
18871 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18872 vector signed char \
18873 : (vector signed char)__builtin_vsx_xxpermx( \
18874 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18875 vector unsigned short \
18876 : (vector unsigned short)__builtin_vsx_xxpermx( \
18877 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18878 vector signed short \
18879 : (vector signed short)__builtin_vsx_xxpermx( \
18880 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18881 vector unsigned int \
18882 : (vector unsigned int)__builtin_vsx_xxpermx( \
18883 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18884 vector signed int \
18885 : (vector signed int)__builtin_vsx_xxpermx( \
18886 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18887 vector unsigned long long \
18888 : (vector unsigned long long)__builtin_vsx_xxpermx( \
18889 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18890 vector signed long long \
18891 : (vector signed long long)__builtin_vsx_xxpermx( \
18892 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18894 : (vector float)__builtin_vsx_xxpermx( \
18895 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18897 : (vector double)__builtin_vsx_xxpermx( \
18898 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d))
18903vec_blendv(vector
signed char __a, vector
signed char __b,
18904 vector
unsigned char __c) {
18905 return (vector
signed char)__builtin_vsx_xxblendvb(
18906 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
__c);
18910vec_blendv(vector
unsigned char __a, vector
unsigned char __b,
18911 vector
unsigned char __c) {
18912 return __builtin_vsx_xxblendvb(
__a,
__b,
__c);
18916vec_blendv(vector
signed short __a, vector
signed short __b,
18917 vector
unsigned short __c) {
18918 return (vector
signed short)__builtin_vsx_xxblendvh(
18919 (vector
unsigned short)
__a, (vector
unsigned short)
__b,
__c);
18923vec_blendv(vector
unsigned short __a, vector
unsigned short __b,
18924 vector
unsigned short __c) {
18925 return __builtin_vsx_xxblendvh(
__a,
__b,
__c);
18929vec_blendv(vector
signed int __a, vector
signed int __b,
18930 vector
unsigned int __c) {
18931 return (vector
signed int)__builtin_vsx_xxblendvw(
18932 (vector
unsigned int)
__a, (vector
unsigned int)
__b,
__c);
18936vec_blendv(vector
unsigned int __a, vector
unsigned int __b,
18937 vector
unsigned int __c) {
18938 return __builtin_vsx_xxblendvw(
__a,
__b,
__c);
18942vec_blendv(vector
signed long long __a, vector
signed long long __b,
18943 vector
unsigned long long __c) {
18944 return (vector
signed long long)__builtin_vsx_xxblendvd(
18945 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
18948static __inline__ vector
unsigned long long __ATTRS_o_ai
18949vec_blendv(vector
unsigned long long __a, vector
unsigned long long __b,
18950 vector
unsigned long long __c) {
18951 return (vector
unsigned long long)__builtin_vsx_xxblendvd(
__a,
__b,
__c);
18955vec_blendv(vector
float __a, vector
float __b, vector
unsigned int __c) {
18956 return (vector
float)__builtin_vsx_xxblendvw((vector
unsigned int)
__a,
18957 (vector
unsigned int)
__b,
__c);
18961vec_blendv(vector
double __a, vector
double __b,
18962 vector
unsigned long long __c) {
18963 return (vector
double)__builtin_vsx_xxblendvd(
18964 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
18967#define vec_replace_unaligned(__a, __b, __c) \
18968 _Generic((__a), vector signed int \
18969 : __builtin_altivec_vinsw((vector unsigned char)__a, \
18970 (unsigned int)__b, __c), \
18971 vector unsigned int \
18972 : __builtin_altivec_vinsw((vector unsigned char)__a, \
18973 (unsigned int)__b, __c), \
18974 vector unsigned long long \
18975 : __builtin_altivec_vinsd((vector unsigned char)__a, \
18976 (unsigned long long)__b, __c), \
18977 vector signed long long \
18978 : __builtin_altivec_vinsd((vector unsigned char)__a, \
18979 (unsigned long long)__b, __c), \
18981 : __builtin_altivec_vinsw((vector unsigned char)__a, \
18982 (unsigned int)__b, __c), \
18984 : __builtin_altivec_vinsd((vector unsigned char)__a, \
18985 (unsigned long long)__b, __c))
18987#define vec_replace_elt(__a, __b, __c) \
18988 _Generic((__a), vector signed int \
18989 : (vector signed int)__builtin_altivec_vinsw_elt( \
18990 (vector unsigned char)__a, (unsigned int)__b, __c), \
18991 vector unsigned int \
18992 : (vector unsigned int)__builtin_altivec_vinsw_elt( \
18993 (vector unsigned char)__a, (unsigned int)__b, __c), \
18994 vector unsigned long long \
18995 : (vector unsigned long long)__builtin_altivec_vinsd_elt( \
18996 (vector unsigned char)__a, (unsigned long long)__b, __c), \
18997 vector signed long long \
18998 : (vector signed long long)__builtin_altivec_vinsd_elt( \
18999 (vector unsigned char)__a, (unsigned long long)__b, __c), \
19001 : (vector float)__builtin_altivec_vinsw_elt( \
19002 (vector unsigned char)__a, (unsigned int)__b, __c), \
19004 : (vector double)__builtin_altivec_vinsd_elt( \
19005 (vector unsigned char)__a, (unsigned long long)__b, __c))
19009#define vec_splati(__a) \
19010 _Generic((__a), signed int \
19011 : ((vector signed int)__a), unsigned int \
19012 : ((vector unsigned int)__a), float \
19013 : ((vector float)__a))
19017static __inline__ vector
double __ATTRS_o_ai vec_splatid(
const float __a) {
19018 return ((vector
double)((
double)
__a));
19023static __inline__ vector
signed int __ATTRS_o_ai vec_splati_ins(
19024 vector
signed int __a,
const unsigned int __b,
const signed int __c) {
19025 const unsigned int __d =
__b & 0x01;
19026#ifdef __LITTLE_ENDIAN__
19036static __inline__ vector
unsigned int __ATTRS_o_ai vec_splati_ins(
19037 vector
unsigned int __a,
const unsigned int __b,
const unsigned int __c) {
19038 const unsigned int __d =
__b & 0x01;
19039#ifdef __LITTLE_ENDIAN__
19050vec_splati_ins(vector
float __a,
const unsigned int __b,
const float __c) {
19051 const unsigned int __d =
__b & 0x01;
19052#ifdef __LITTLE_ENDIAN__
19065vec_test_lsbb_all_ones(vector
unsigned char __a) {
19066 return __builtin_vsx_xvtlsbb(
__a, 1);
19072vec_test_lsbb_all_zeros(vector
unsigned char __a) {
19073 return __builtin_vsx_xvtlsbb(
__a, 0);
19080vec_stril(vector
unsigned char __a) {
19081#ifdef __LITTLE_ENDIAN__
19082 return (vector
unsigned char)__builtin_altivec_vstribr(
19083 (vector
unsigned char)
__a);
19085 return (vector
unsigned char)__builtin_altivec_vstribl(
19086 (vector
unsigned char)
__a);
19091vec_stril(vector
signed char __a) {
19092#ifdef __LITTLE_ENDIAN__
19093 return (vector
signed char)__builtin_altivec_vstribr(
19094 (vector
unsigned char)
__a);
19096 return (vector
signed char)__builtin_altivec_vstribl(
19097 (vector
unsigned char)
__a);
19102vec_stril(vector
unsigned short __a) {
19103#ifdef __LITTLE_ENDIAN__
19104 return (vector
unsigned short)__builtin_altivec_vstrihr(
19105 (vector
signed short)
__a);
19107 return (vector
unsigned short)__builtin_altivec_vstrihl(
19108 (vector
signed short)
__a);
19113vec_stril(vector
signed short __a) {
19114#ifdef __LITTLE_ENDIAN__
19115 return __builtin_altivec_vstrihr(
__a);
19117 return __builtin_altivec_vstrihl(
__a);
19123static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned char __a) {
19124#ifdef __LITTLE_ENDIAN__
19125 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19127 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19131static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed char __a) {
19132#ifdef __LITTLE_ENDIAN__
19133 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19135 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19139static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned short __a) {
19140#ifdef __LITTLE_ENDIAN__
19141 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19143 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19147static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed short __a) {
19148#ifdef __LITTLE_ENDIAN__
19149 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19151 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19158vec_strir(vector
unsigned char __a) {
19159#ifdef __LITTLE_ENDIAN__
19160 return (vector
unsigned char)__builtin_altivec_vstribl(
19161 (vector
unsigned char)
__a);
19163 return (vector
unsigned char)__builtin_altivec_vstribr(
19164 (vector
unsigned char)
__a);
19169vec_strir(vector
signed char __a) {
19170#ifdef __LITTLE_ENDIAN__
19171 return (vector
signed char)__builtin_altivec_vstribl(
19172 (vector
unsigned char)
__a);
19174 return (vector
signed char)__builtin_altivec_vstribr(
19175 (vector
unsigned char)
__a);
19180vec_strir(vector
unsigned short __a) {
19181#ifdef __LITTLE_ENDIAN__
19182 return (vector
unsigned short)__builtin_altivec_vstrihl(
19183 (vector
signed short)
__a);
19185 return (vector
unsigned short)__builtin_altivec_vstrihr(
19186 (vector
signed short)
__a);
19191vec_strir(vector
signed short __a) {
19192#ifdef __LITTLE_ENDIAN__
19193 return __builtin_altivec_vstrihl(
__a);
19195 return __builtin_altivec_vstrihr(
__a);
19201static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned char __a) {
19202#ifdef __LITTLE_ENDIAN__
19203 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19205 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19209static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed char __a) {
19210#ifdef __LITTLE_ENDIAN__
19211 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19213 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19217static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned short __a) {
19218#ifdef __LITTLE_ENDIAN__
19219 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19221 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19225static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed short __a) {
19226#ifdef __LITTLE_ENDIAN__
19227 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19229 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19235#ifdef __SIZEOF_INT128__
19236static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19237vec_sl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19238 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19243vec_sl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19244 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19248static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19249vec_sr(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19250 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19255vec_sr(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19257 vector
signed __int128)(((vector
unsigned __int128)
__a) >>
19259 (vector
unsigned __int128)(
sizeof(
19260 unsigned __int128) *
19264static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19265vec_sra(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19267 vector
unsigned __int128)(((vector
signed __int128)
__a) >>
19269 (vector
unsigned __int128)(
sizeof(
19270 unsigned __int128) *
19275vec_sra(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19276 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19283#ifdef __POWER8_VECTOR__
19284#define __bcdadd(__a, __b, __ps) __builtin_ppc_bcdadd((__a), (__b), (__ps))
19285#define __bcdsub(__a, __b, __ps) __builtin_ppc_bcdsub((__a), (__b), (__ps))
19287static __inline__
long __bcdadd_ofl(vector
unsigned char __a,
19288 vector
unsigned char __b) {
19292static __inline__
long __bcdsub_ofl(vector
unsigned char __a,
19293 vector
unsigned char __b) {
19297static __inline__
long __bcd_invalid(vector
unsigned char __a) {
19301static __inline__
long __bcdcmpeq(vector
unsigned char __a,
19302 vector
unsigned char __b) {
19306static __inline__
long __bcdcmplt(vector
unsigned char __a,
19307 vector
unsigned char __b) {
19311static __inline__
long __bcdcmpgt(vector
unsigned char __a,
19312 vector
unsigned char __b) {
19316static __inline__
long __bcdcmple(vector
unsigned char __a,
19317 vector
unsigned char __b) {
19321static __inline__
long __bcdcmpge(vector
unsigned char __a,
19322 vector
unsigned char __b) {
static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_lvewx(long __a, const int *__b)
static __inline__ vector signed int __ATTRS_o_ai vec_sube(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, long __b, vector signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b)
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, signed int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvx(long __a, const vector signed char *__b)
static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvehx(vector short __a, long __b, short *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_abss(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c)
static __inline__ vector int __ATTRS_o_ai vec_vupkhsh(vector short __a)
static __inline__ int __ATTRS_o_ai vec_any_ngt(vector float __a, vector float __b)
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lde(long __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c)
static __ATTRS_o_ai vector signed char vec_xl(ptrdiff_t __offset, const signed char *__ptr)
static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector bool char __a, vector bool char __b)
static __inline__ int __ATTRS_o_ai vec_any_nge(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sldw(vector signed char __a, vector signed char __b, unsigned const int __c)
vector signed char unaligned_vec_schar __attribute__((aligned(1)))
static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b)
static __inline__ vector float vector float vector float __c
static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b)
static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a)
static __inline__ vector float vector float __b
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_recipdiv(vector float __a, vector float __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ld(long __a, const vector signed char *__b)
static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b)
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b)
static __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a)
static __inline__ int __ATTRS_o_ai vec_any_nan(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, long __b, vector signed char *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c)
static __inline__ vector int __ATTRS_o_ai vec_vsrw(vector int __a, vector unsigned int __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_sum4s(vector signed char __a, vector int __b)
static __inline__ void __ATTRS_o_ai vec_mtvscr(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_mul(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b)
static __ATTRS_o_ai void vec_xst(vector signed char __vec, ptrdiff_t __offset, signed char *__ptr)
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmrglh(vector short __a, vector short __b)
static __inline__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b)
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_vrlh(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_vrlw(vector int __a, vector unsigned int __b)
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, vector signed char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short)
static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(long __a, const vector signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_numeric(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vupklsh(vector short __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvebx(long __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a)
static __inline__ vector int __ATTRS_o_ai vec_vslw(vector int __a, vector unsigned int __b)
static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, long __b, signed char *__c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrh(vector short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundp(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, long __b, int *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_adde(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_numeric(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ldl(long __a, const vector signed char *__b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b)
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, unsigned const int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a, vector short __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_neg(vector float __a)
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vmrghh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector short __ATTRS_o_ai vec_lvehx(long __a, const short *__b)
static __inline__ void __ATTRS_o_ai vec_stvebx(vector signed char __a, long __b, signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_any_nlt(vector float __a, vector float __b)
static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_abs(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundm(vector float __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b)
static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_nle(vector float __a, vector float __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, unsigned char __b)
static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a)
static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, vector unsigned char __b)
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector signed char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_nlt(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_div(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, vector int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundz(vector float __a)
static __inline__ int __ATTRS_o_ai vec_any_nle(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b)
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
static __inline__ void int __a
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.